43 lines
1.9 KiB
Plaintext
43 lines
1.9 KiB
Plaintext
@using EnVisage.Models
|
|
@using Newtonsoft.Json
|
|
@model MixEditScenarioFinInfoModel
|
|
|
|
@{
|
|
var finInfo = (Model == null || Model.FinInfo == null) ? "" : JsonConvert.SerializeObject(new
|
|
{
|
|
expense = Model.FinInfo.TDDirectCosts,
|
|
revenue = Model.FinInfo.ProjectedRevenue,
|
|
useLMMargin = Model.FinInfo.UseLMMargin,
|
|
grossMargin = Model.FinInfo.GrossMargin ?? 0,
|
|
lmMargin = Model.FinInfo.LMMargin ?? 0,
|
|
dateForStartOfChanges = Model.FinInfo.DateForStartOfChanges.HasValue ? Model.FinInfo.DateForStartOfChanges.Value.ToString("MM/dd/yyyy") : string.Empty,
|
|
isEditable = true
|
|
});
|
|
}
|
|
<script>
|
|
function isValidFinInfoForm() {
|
|
$.validator.unobtrusive.parseDynamicContent('#mix-scenario-fininfo-form');
|
|
return $('#mix-scenario-fininfo-form').valid();
|
|
};
|
|
</script>
|
|
<div ng-controller="scenarioHeaderController" ng-init="init(@finInfo)">
|
|
<div class="row" ng-show="!HeaderIsChanged">
|
|
<div class="panel-body form-horizontal">
|
|
<form style="border:0;" editable-form id="mix-scenario-fininfo-form">
|
|
@Html.EditorFor(x => x.FinInfo)
|
|
@Html.ValidationSummary(false, "The Scenario Financial Information could not be saved due to the following errors:")
|
|
<div class="form-group" style="margin-bottom: 0;">
|
|
<div class="col-sm-12">
|
|
<button type="button" class="btn btn-success pull-right" ng-disabled="!IsChanged" ng-click="saveFinInfo()">
|
|
<i class=" fa fa-save"></i> Submit Changes
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="row" ng-show="HeaderIsChanged" data-section="scenarioCalendar">
|
|
@Html.Partial("~/Views/Scenarios/_scenarioCalendar.cshtml", Model.Calendar)
|
|
</div>
|
|
</div>
|