-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMapping.cshtml
More file actions
243 lines (231 loc) · 13.5 KB
/
Mapping.cshtml
File metadata and controls
243 lines (231 loc) · 13.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
@page
@using Unity.GrantManager.ApplicationForms
@using Unity.GrantManager.Localization;
@using Volo.Abp.AspNetCore.Mvc.UI.Layout;
@using Unity.GrantManager.Web.Pages.ApplicationForms;
@using Microsoft.Extensions.Localization;
@using Microsoft.AspNetCore.Authorization;
@using Unity.GrantManager.Permissions;
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal;
@using Volo.Abp.Authorization.Permissions;
@model MappingModel
@inject IAuthorizationService AuthorizationService
@inject IStringLocalizer<GrantManagerResource> L
@inject IPageLayout PageLayout
@inject IPermissionChecker PermissionChecker
@{
PageLayout.Content.MenuItemName = "GrantManager.ApplicationForms";
PageLayout.Content.Title = "Application Mapping";
ViewBag.PageTitle = "Application Forms Mapping";
}
@section scripts
{
<abp-script src="/Pages/ApplicationForms/Mapping.js" />
<abp-script src="/Pages/ApplicationForms/LinkWorksheetsModal.js" />
<abp-script src="/Pages/SettingManagement/zone-management.js" />
}
@section styles {
<abp-style src="/Pages/ApplicationForms/Mapping.css" />
<abp-style src="/Pages/ApplicationForms/LinkWorksheetsModal.css" />
}
<input type="hidden" id="intakeProperties" value="@Model.IntakeProperties" />
<input type="hidden" id="applicationFormVersionDtoString" value="@Model.ApplicationFormVersionDtoString" />
<input type="hidden" id="availableChefsFields" value="@Model.ApplicationFormVersionDto?.AvailableChefsFields" />
<input type="hidden" id="existingMapping" value="@Model.ApplicationFormVersionDto?.SubmissionHeaderMapping" />
<input type="hidden" id="formVersionId" value="@Model.ApplicationFormVersionDto?.Id" />
<input type="hidden" id="applicationFormId" value="@Model.ApplicationFormDto?.Id" />
<input type="hidden" id="chefsFormId" value="@Model.ApplicationFormDto?.ChefsApplicationFormGuid" />
<input type="hidden" id="formName" value="@Model.ApplicationFormDto?.ApplicationFormName" />
<div class="container-fluid">
<div class="row">
<div class="col-12">
<h5 class="label unt-label">@Model.ApplicationFormDto?.ApplicationFormName</h5>
</div>
</div>
<!--Tab list -->
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-mapping-tab" data-bs-toggle="tab" data-bs-target="#nav-mapping" type="button" role="tab">Mapping</button>
@if (await PermissionChecker.IsGrantedAsync(UnitySettingManagementPermissions.UserInterface))
{
<button class="nav-link" id="nav-ui-configuration-tab" data-bs-toggle="tab" data-bs-target="#nav-ui-configuration" type="button" role="tab">UI Configuration</button>
}
<button class="nav-link" id="nav-payment-configuration-tab" data-bs-toggle="tab" data-bs-target="#nav-payment-configuration" type="button" role="tab">Payment Configuration</button>
<button class="nav-link" id="nav-other-configuration-tab" data-bs-toggle="tab" data-bs-target="#nav-other-configuration" type="button" role="tab">Other Configuration</button>
</div>
</nav>
<div class="tab-content unt-tab-content" id="nav-tabContent">
<!--Tab Content: Mapping-->
<div class="tab-pane fade show active" id="nav-mapping" role="tabpanel" aria-labelledby="nav-mapping-tab">
<div class="row">
<div class="col-4 p-3">
<label for="applicationFormVersion" class="form-label">Version:</label>
<div class="select-icon-wrapper">
<select class="form-select form-control" id="applicationFormVersion" name="Version">
@foreach (var applicationFormVersionDto in Model?.ApplicationFormVersionDtoList ?? new List<ApplicationFormVersionDto> { })
{
@if (@applicationFormVersionDto.ChefsFormVersionGuid + "" != "")
{
var selected = false;
@if (Model?.ChefsFormVersionGuid + "" == applicationFormVersionDto.ChefsFormVersionGuid)
{
selected = true;
}
<option value="@applicationFormVersionDto.ChefsFormVersionGuid" selected="@(selected)"> @applicationFormVersionDto.Version - @applicationFormVersionDto.ChefsFormVersionGuid</option>
}
}
</select>
@if (Model?.ApplicationFormVersionDto?.Published == true)
{
<i class="fl fl-tick published-tick" data-toggle="tooltip" title="This form is published"></i>
}
</div>
</div>
<div class="col-4 p-3">
<label for="chefsFormVersionId" class="form-label">Form Version ID:</label>
<div class="input-button-wrapper ">
<input id="chefsFormVersionId" class="form-control input-width" type="text" value="@Model?.ChefsFormVersionGuid">
<abp-button id="btn-sync"
text="Sync"
disabled="false"
icon-type="Other"
icon="fl fl-synch"
class="btn unt-btn-success btn-success"
abp-tooltip="Call out to CHEFS and bring back all the Available CHEFS form Fields. This action requires a Form Version ID to be entered"
button-type="Success" />
</div>
</div>
</div>
@if (Model?.FlexEnabled == true)
{
<div class="row">
<div class="col-4">
<input type="hidden" id="originalScoresheetId" value="@Model.ScoresheetId" />
<abp-select asp-for="@Model.ScoresheetId" asp-items="@Model.ScoresheetOptionsList" id="scoresheet" label="Scoresheets:">
<option value="">Please choose...</option>
</abp-select>
</div>
<div class="col-4">
<div class="btn-label-wrapper">
<label for="btn-link-worksheets" class="form-label">Custom Fields:</label>
<abp-button id="btn-link-worksheets"
icon-type="Other"
icon="fl fl-link"
text="Link Worksheets"
class="btn unt-btn-primary btn-primary"
abp-tooltip="Link custom field worksheets for the currently selected form version."
button-type="Primary" />
</div>
</div>
</div>
}
<div class="unt-mapping-container">
<div class="row">
<div class="col-8">
<div class="label table-title">Chefs Available Fields</div>
</div>
<div class="col-4">
<div class="title intake-mapping-title row label table-title">Available Intake Mapping Fields</div>
</div>
</div>
<div class="row">
<div class="col-8">
<div class="application-forms-table-content">
<abp-table id="ApplicationFormsTable" class="chef-field-table">
<thead>
<tr>
<th scope="Column">CHEFS Label</th>
<th scope="Column">CHEFS Property Name</th>
<th scope="Column">CHEFS Type</th>
<th scope="Column">Map To Unity</th>
</tr>
</thead>
</abp-table>
</div>
</div>
<div class="col-4">
<div class="intake-mapping-content">
<div id="intake-map-available-fields-column" class="col" style="overflow-y:scroll"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="buttons">
<div class="buttons-div">
<abp-button id="btn-save"
text="Save"
icon-type="Other"
icon="fl fl-save"
class="btn unt-btn-primary btn-primary mx-1"
style="pointer-events: all;"
abp-tooltip="Save the Scoresheet and the Mapping of CHEFS fields to Unity Fields"
button-type="Primary" />
<abp-button id="btn-edit"
text="Edit Mapping"
icon-type="Other"
data-target="#editMappingModal"
icon="fl fl-edit"
class="btn unt-btn-primary btn-primary mx-1"
data-toggle="modal"
style="pointer-events: all;"
abp-tooltip="Edit the Mapping JSON Manually"
button-type="Primary" />
<abp-button id="btn-reset"
text="Reset Mapping"
icon-type="Other"
icon="fl fl-undo"
class="btn unt-btn-outline-primary btn-outline-primary mx-1"
abp-tooltip="This button resets the mapping to the last saved state" />
<abp-button id="btn-back"
text="Back"
class="btn unt-btn-outline-primary btn-outline-primary mx-1"
abp-tooltip="Navigate back to the Forms" />
</div>
</div>
</div>
</div>
</div>
</div>
<!--Tab Content: UI Configuration loaded by initializeUIConfiguration-->
<div class="tab-pane fade" id="nav-ui-configuration" role="tabpanel" aria-labelledby="nav-ui-configuration-tab"></div>
<!--Tab Content: Payment Configuration-->
<div class="tab-pane fade" id="nav-payment-configuration" role="tabpanel" aria-labelledby="nav-payment-configuration-tab"></div>
<!--Tab Content: Other Configuration-->
<div class="tab-pane fade" id="nav-other-configuration" role="tabpanel" aria-labelledby="nav-other-configuration-tab">
<div class="row">
<div class="col-12 p-3">
<h6 class="mb-3"><b>Workflow Settings</b></h6>
<div class="switch-container">
<div class="form-check unt-form-switch form-switch">
<input class="form-check-input " checked="@Model?.ApplicationFormDto?.IsDirectApproval" type="checkbox" id="directApproval">
<label class="form-check-label direct-approval" for="redStop">Direct Approval</label>
</div>
</div>
<label class="form-label note mt-1"><b>NOTE:</b> Note : Enabling this feature will bypass the Assessment workflow when you approve submissions associated with this form.</label>
</div>
</div>
</div>
</div>
</div>
<abp-modal centered="true" scrollable="true" size="Large" id="editMappingModal">
<abp-modal-header title="Edit Mapping JSON"></abp-modal-header>
<abp-modal-body>
<textarea id="jsonText" rows="15" cols="80">@Model?.ApplicationFormVersionDto?.SubmissionHeaderMapping</textarea>
</abp-modal-body>
<abp-modal-footer>
<abp-button id="btn-save-mapping"
text="Save Mapping JSON"
icon-type="Other"
class="btn unt-btn-primary btn-primary"
abp-tooltip="Save the Mapping JSON"
button-type="Primary" />
<abp-button id="btn-cancel-mapping"
text="Cancel"
icon-type="Other"
class="btn unt-btn-link btn-link"
abp-tooltip="Cancel the Edit"
button-type="Secondary" />
</abp-modal-footer>
</abp-modal>
</div>