From cc261d95630cac549ef0e89a8f4199ac6a57a814 Mon Sep 17 00:00:00 2001 From: Andre Goncalves Date: Tue, 19 Nov 2024 10:37:07 -0800 Subject: [PATCH 1/9] AB#26446 textarea field still wip --- .../Unity.Flex.Shared/FlexTypeExtensions.cs | 6 + .../Scoresheet/Enums/QuestionType.cs | 1 + .../Definitions/DefinitionResolver.cs | 13 ++ .../UpsertCustomFieldModal.cshtml | 2 +- .../QuestionDefinitionWidget/Default.cshtml | 6 + .../QuestionDefinitionWidget.cs | 1 + .../QuestionTextAreaWidget/Default.cshtml | 22 ++ .../QuestionTextAreaViewModel.cs | 14 ++ .../QuestionTextAreaWidget.cs | 34 +++ .../QuestionTextAreaWidgetController.cs | 27 +++ .../Components/Scoresheet/Scoresheet.js | 209 ++++++++++-------- .../TextAreaDefinitionViewModel.cs | 2 +- .../TextAreaDefinitionWidget.cs | 9 +- .../AssessmentScoresWidgetViewComponent.cs | 13 +- .../AssessmentScoresWidget/Default.cshtml | 40 +++- 15 files changed, 288 insertions(+), 111 deletions(-) create mode 100644 applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/Default.cshtml create mode 100644 applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs create mode 100644 applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs create mode 100644 applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidgetController.cs diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/FlexTypeExtensions.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/FlexTypeExtensions.cs index 3bb7c93aa..bcb45a30f 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/FlexTypeExtensions.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/FlexTypeExtensions.cs @@ -63,6 +63,7 @@ public static string ConvertInputType(this CustomFieldType type) QuestionType.Number => JsonSerializer.Deserialize(definition), QuestionType.YesNo => JsonSerializer.Deserialize(definition), QuestionType.SelectList => JsonSerializer.Deserialize(definition), + QuestionType.TextArea => JsonSerializer.Deserialize(definition), _ => null, }; } @@ -138,5 +139,10 @@ public static bool GetIsDynamic(this CustomFieldDefinition field) { return DefinitionResolver.ResolveIsDynamic(field); } + + public static uint? GetRowsOrZero(this CustomFieldDefinition field) + { + return DefinitionResolver.ResolveRows(field) ?? 0; + } } } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Scoresheet/Enums/QuestionType.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Scoresheet/Enums/QuestionType.cs index 6671fe8ec..46a0b9185 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Scoresheet/Enums/QuestionType.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Scoresheet/Enums/QuestionType.cs @@ -6,5 +6,6 @@ public enum QuestionType Text = 2, YesNo = 6, SelectList = 12, + TextArea = 14 } } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/DefinitionResolver.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/DefinitionResolver.cs index b483bf46f..1c797c4bf 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/DefinitionResolver.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/DefinitionResolver.cs @@ -91,6 +91,7 @@ public static string Resolve(QuestionType type, object? definition) QuestionType.Text => JsonSerializer.Serialize(new TextDefinition()), QuestionType.YesNo => JsonSerializer.Serialize(new QuestionYesNoDefinition()), QuestionType.SelectList => JsonSerializer.Serialize(new QuestionSelectListDefinition()), + QuestionType.TextArea => JsonSerializer.Serialize(new TextAreaDefinition()), _ => throw new NotImplementedException(), }; } @@ -102,6 +103,7 @@ public static string Resolve(QuestionType type, object? definition) QuestionType.Text => JsonSerializer.Serialize((TextDefinition)definition), QuestionType.YesNo => JsonSerializer.Serialize((QuestionYesNoDefinition)definition), QuestionType.SelectList => JsonSerializer.Serialize((QuestionSelectListDefinition)definition), + QuestionType.TextArea => JsonSerializer.Serialize((TextAreaDefinition)definition), _ => throw new NotImplementedException(), }; } @@ -113,6 +115,7 @@ public static string Resolve(QuestionType type, object? definition) QuestionType.Text => JsonSerializer.Serialize(element.ToString()), QuestionType.YesNo => JsonSerializer.Serialize(element.ToString()), QuestionType.SelectList => JsonSerializer.Serialize(element.ToString()), + QuestionType.TextArea => JsonSerializer.Serialize(element.ToString()), _ => throw new NotImplementedException(), }; } @@ -124,6 +127,7 @@ public static string Resolve(QuestionType type, object? definition) QuestionType.Text => JsonSerializer.Serialize(definition), QuestionType.YesNo => JsonSerializer.Serialize(definition), QuestionType.SelectList => JsonSerializer.Serialize(definition), + QuestionType.TextArea => JsonSerializer.Serialize(definition), _ => throw new NotImplementedException(), }; } @@ -202,5 +206,14 @@ public static bool ResolveIsDynamic(CustomFieldDefinition field) _ => false }; } + + public static uint? ResolveRows(CustomFieldDefinition field) + { + return field switch + { + TextAreaDefinition textArea => textArea.Rows, + _ => null, + }; + } } } \ No newline at end of file diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertCustomFieldModal.cshtml b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertCustomFieldModal.cshtml index dd6618723..e89d9c4d4 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertCustomFieldModal.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertCustomFieldModal.cshtml @@ -40,7 +40,7 @@ onchange="typeSelectionChanged(this)"> - +
@await Component.InvokeAsync(typeof(CustomFieldDefinitionWidget), new { type = Model.FieldType, definition = Model.Definition })
diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/Default.cshtml index 71082a3d6..5216eea0d 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/Default.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/Default.cshtml @@ -2,6 +2,7 @@ @using Unity.Flex.Web.Views.Shared.Components.NumericDefinitionWidget; @using Unity.Flex.Web.Views.Shared.Components.QuestionYesNoDefinitionWidget; @using Unity.Flex.Web.Views.Shared.Components.QuestionSelectListDefinitionWidget; +@using Unity.Flex.Web.Views.Shared.Components.TextAreaDefinitionWidget @using Unity.Flex.Web.Views.Shared.Components.TextDefinitionWidget; @using Unity.Flex; @@ -29,6 +30,11 @@ @await Component.InvokeAsync(typeof(QuestionSelectListDefinitionWidget), new { Model.Definition }) break; + case Unity.Flex.Scoresheets.QuestionType.TextArea: + + @await Component.InvokeAsync(typeof(TextAreaDefinitionWidget), new { Model.Definition }) + + break; default: break; } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/QuestionDefinitionWidget.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/QuestionDefinitionWidget.cs index a5fc7664d..a2ffea8ae 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/QuestionDefinitionWidget.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionDefinitionWidget/QuestionDefinitionWidget.cs @@ -26,6 +26,7 @@ public class QuestionDefinitionWidget : AbpViewComponent QuestionType.Text => (CustomFieldDefinition?)TextDefinitionWidget.TextDefinitionWidget.ParseFormValues(form), QuestionType.YesNo => (CustomFieldDefinition?)QuestionYesNoDefinitionWidget.QuestionYesNoDefinitionWidget.ParseFormValues(form), QuestionType.SelectList => (CustomFieldDefinition?)QuestionSelectListDefinitionWidget.QuestionSelectListDefinitionWidget.ParseFormValues(form), + QuestionType.TextArea => (CustomFieldDefinition?)TextAreaDefinitionWidget.TextAreaDefinitionWidget.ParseFormValues(form), _ => null, }; } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/Default.cshtml new file mode 100644 index 000000000..2ac1705de --- /dev/null +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/Default.cshtml @@ -0,0 +1,22 @@ +@using Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget; + +@model QuestionTextAreaViewModel; + +
+ + + +
+
+ + +
\ No newline at end of file diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs new file mode 100644 index 000000000..69acf877d --- /dev/null +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs @@ -0,0 +1,14 @@ +using System; + +namespace Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget +{ + public class QuestionTextAreaViewModel : RequiredFieldViewModel + { + public Guid QuestionId { get; set; } + public bool IsDisabled { get; set; } + public string Answer { get; set; } = string.Empty; + public string? MinLength { get; set; } + public string? MaxLength { get; set; } + public uint? Rows { get; set; } = 0; + } +} diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs new file mode 100644 index 000000000..ec22b9073 --- /dev/null +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Mvc.UI.Widgets; +using Volo.Abp.AspNetCore.Mvc; +using System; + +namespace Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget +{ + [Widget( + RefreshUrl = "Widgets/QuestionTextAreaWidget/Refresh", + AutoInitialize = true)] + public class QuestionTextAreaWidget : AbpViewComponent + { + public async Task InvokeAsync(Guid questionId, + bool isDisabled, + string? answer, + string? minLength, + string? maxLength, + uint? rows = 0, + bool required = false) + { + return View(await Task.FromResult(new QuestionTextAreaViewModel() + { + QuestionId = questionId, + IsDisabled = isDisabled, + Answer = answer ?? string.Empty, + MinLength = minLength, + MaxLength = maxLength, + Required = required, + Rows = rows + })); + } + } +} diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidgetController.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidgetController.cs new file mode 100644 index 000000000..b9bb0c02f --- /dev/null +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidgetController.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using System; +using Volo.Abp.AspNetCore.Mvc; + +namespace Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget +{ + [ApiExplorerSettings(IgnoreApi = true)] + [Route("GrantApplications/Widgets/QuestionTextArea")] + public class QuestionTextAreaWidgetController : AbpController + { + [HttpGet] + [Route("Refresh")] + public IActionResult Refresh(Guid questionId, bool isDisabled, string? answer, int? minLength, int? maxLength) + { + // Check if the model state is valid + if (!ModelState.IsValid) + { + Logger.LogWarning("Invalid model state for QuestionTextAreaWidgetController:Refresh"); + return ViewComponent(typeof(QuestionTextAreaWidget)); + } + + // If the model state is valid, render the view component + return ViewComponent(typeof(QuestionTextAreaWidget), new { questionId, isDisabled, answer, minLength, maxLength }); + } + } +} diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Scoresheet.js b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Scoresheet.js index f45986f07..82f5589a9 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Scoresheet.js +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Scoresheet.js @@ -2,7 +2,7 @@ $(function () { function makeScoresheetsSortable() { document.querySelectorAll('[id^="sections-questions"]').forEach(function (div) { - + _ = new Sortable(div, { animation: 150, onEnd: function (evt) { @@ -22,7 +22,7 @@ $(function () { const isSecondItemSection = secondItem?.classList.contains('section-item'); if (isTopItem && !isSecondItemSection) { - return false; + return false; } if (isDraggedSection) { @@ -36,28 +36,28 @@ $(function () { }); }); - + _ = new Sortable(document.getElementById('scoresheet-accordion'), { handle: '.draggable-header', animation: 150, ghostClass: 'blue-background', onEnd: function (evt) { - let itemEl = evt.item; + let itemEl = evt.item; itemEl.style.border = ""; updateScoresheetOrder(); }, onStart: function (evt) { - let itemEl = evt.item; - itemEl.style.border = "2px solid lightblue"; + let itemEl = evt.item; + itemEl.style.border = "2px solid lightblue"; }, }); - + } function updateScoresheetOrder() { let order = []; $("#scoresheet-accordion .accordion-item").each(function (index, element) { - let scoresheetId = $(element).find(".accordion-header").attr("id").replace("heading-",""); + let scoresheetId = $(element).find(".accordion-header").attr("id").replace("heading-", ""); order.push(scoresheetId); }); unity.flex.scoresheets.scoresheet.saveScoresheetOrder(order) @@ -86,16 +86,16 @@ $(function () { updatePreviewAccordion(sortedItems); } - + function attachAccordionToggleListeners() { const accordionItems = document.querySelectorAll('#scoresheet-accordion .accordion-button'); accordionItems.forEach(button => { button.addEventListener('click', function () { - setTimeout(updateUnsortedPreview, 500); + setTimeout(updateUnsortedPreview, 500); }); }); - } - + } + function updatePreviewAccordion(sortedItems) { const previewDiv = document.getElementById('preview'); @@ -104,6 +104,14 @@ $(function () { return; } + const previewBuilders = { + "Text": buildTextFieldPreview, + "YesNo": buildYesNoFieldPreview, + "Number": buildNumberFieldPreview, + "SelectList": buildSelectListFieldPreview, + "TextArea": buildTextAreaFieldPreview + }; + let accordionHTML = ''; let currentSectionItem = null; let sectionNumber = 1; @@ -130,78 +138,6 @@ $(function () { currentSectionItem = item; questionNumber = 1; } else { - let questionBody = ''; - if (item.dataset.questiontype === "Text") { - questionBody = ` -

${item.dataset.questiondesc}

-
- - - -
-
- - -
`; - } else if (item.dataset.questiontype === "YesNo") { - questionBody = ` -

${item.dataset.questiondesc}

-
- - -
-
- - -
`; - } else if (item.dataset.questiontype === "Number") { - questionBody = ` -

${item.dataset.questiondesc}

-
- - - -
-
- - -
`; - } else if (item.dataset.questiontype === "SelectList") { - const options = JSON.parse(item.dataset.definition).options || []; - let optionsHTML = ``; - optionsHTML += options.map(option => { - const truncatedValue = option.value.length > 100 ? option.value.substring(0, 100) + " ..." : option.value; - return ``; - }).join(''); - - questionBody = ` -

${item.dataset.questiondesc}

-
- - -
-
- - -
`; - } - accordionHTML += `

@@ -211,7 +147,7 @@ $(function () {

- ${questionBody} + ${buildFieldPreview(previewBuilders[item.dataset.questiontype], item)}
`; @@ -242,6 +178,100 @@ $(function () { updateSubtotal(); } + function buildFieldPreview(builder, item) { + return builder ? builder(item) : null; + } + + function buildTextAreaFieldPreview(item) { + return ` +

${item.dataset.questiondesc}

+
+ + + +
+
+ + +
`; + } + + function buildSelectListFieldPreview(item) { + const options = JSON.parse(item.dataset.definition).options || []; + let optionsHTML = ``; + optionsHTML += options.map(option => { + const truncatedValue = option.value.length > 100 ? option.value.substring(0, 100) + " ..." : option.value; + return ``; + }).join(''); + + return ` +

${item.dataset.questiondesc}

+
+ + +
+
+ + +
`; + } + + function buildNumberFieldPreview(item) { + return ` +

${item.dataset.questiondesc}

+
+ + + +
+
+ + +
`; + } + + function buildYesNoFieldPreview(item) { + return ` +

${item.dataset.questiondesc}

+
+ + +
+
+ + +
`; + } + + function buildTextFieldPreview(item) { + return ` +

${item.dataset.questiondesc}

+
+ + + +
+
+ + +
`; + } function hashCode(str) { let hash = 0; @@ -256,11 +286,11 @@ $(function () { return hash; } - + makeScoresheetsSortable(); attachAccordionToggleListeners(); updateUnsortedPreview(); - + PubSub.subscribe( 'refresh_scoresheet_configuration_page', (msg, data) => { @@ -301,12 +331,10 @@ let sectionModal = new abp.ModalManager({ viewUrl: 'ScoresheetConfiguration/SectionModal' }); - - sectionModal.onResult(function (response) { const actionType = $(response.currentTarget).find('#ActionType').val(); PubSub.publish('refresh_scoresheet_list', { scoresheetId: selectedScoresheetId }); - + abp.notify.success( actionType + ' is successful.', 'Scoresheet Section' @@ -382,7 +410,6 @@ function savePreviewChanges(questionId, inputFieldPrefix, saveButtonPrefix, disc discardButton.disabled = true; updateSubtotal(); - } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionViewModel.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionViewModel.cs index eeb48762a..46263f869 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionViewModel.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionViewModel.cs @@ -4,7 +4,7 @@ namespace Unity.Flex.Web.Views.Shared.Components.TextAreaDefinitionWidget { - public class TextAreaDefinitionViewModel : WorksheetFieldDefinitionViewModelBase + public class TextAreaDefinitionViewModel : RequiredFieldViewModel { public TextAreaDefinitionViewModel() : base() { diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionWidget.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionWidget.cs index 864bbeb59..69ff00dc8 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionWidget.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/TextAreaDefinitionWidget/TextAreaDefinitionWidget.cs @@ -7,12 +7,13 @@ using Microsoft.AspNetCore.Http; using Unity.Flex.Worksheets.Definitions; using System.Text.Json; +using Unity.Flex.Web.Views.Shared.Components.QuestionDefinitionWidget; namespace Unity.Flex.Web.Views.Shared.Components.TextAreaDefinitionWidget { [Widget( RefreshUrl = "../Flex/Widgets/TextAreaDefinition/Refresh", - ScriptTypes = [typeof(TextAreaDefinitionWidgetScriptBundleContributor)], + ScriptTypes = [typeof(TextAreaDefinitionWidgetScriptBundleContributor)], AutoInitialize = true)] public class TextAreaDefinitionWidget : AbpViewComponent { @@ -23,7 +24,8 @@ public class TextAreaDefinitionWidget : AbpViewComponent MinLength = uint.Parse(form["MinLength"].ToString()), MaxLength = uint.Parse(form["MaxLength"].ToString()), Rows = uint.Parse(form["Rows"].ToString()), - }; + } + .ApplyRequired(form); } public async Task InvokeAsync(string? definition) @@ -37,7 +39,8 @@ public async Task InvokeAsync(string? definition) { MinLength = textAreaDefinition.MinLength, MaxLength = textAreaDefinition.MaxLength, - Rows = textAreaDefinition.Rows + Rows = textAreaDefinition.Rows, + Required = textAreaDefinition.Required })); } } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/AssessmentScoresWidgetViewComponent.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/AssessmentScoresWidgetViewComponent.cs index 1cda0eb1d..c051c4dc6 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/AssessmentScoresWidgetViewComponent.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/AssessmentScoresWidgetViewComponent.cs @@ -31,7 +31,7 @@ public AssessmentScoresWidgetViewComponent(IAssessmentRepository assessmentRepos _scoresheetRepository = scoresheetRepository; _scoresheetInstanceRepository = scoresheetInstanceRepository; } - + public async Task InvokeAsync(Guid assessmentId, Guid currentUserId) { @@ -77,8 +77,13 @@ public async Task InvokeAsync(Guid assessmentId, Guid curr question.Answer = ValueResolver.Resolve(answer.CurrentValue!, CustomFieldType.SelectList)!.ToString(); break; } + case QuestionType.TextArea: + { + question.Answer = ValueResolver.Resolve(answer.CurrentValue!, CustomFieldType.TextArea)!.ToString(); + break; + } } - + } } } @@ -98,8 +103,8 @@ public async Task InvokeAsync(Guid assessmentId, Guid curr }; return View(model); - } - + } + } public class AssessmentScoresWidgetStyleBundleContributor : BundleContributor diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml index 7c1efb598..824e22eb2 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml @@ -1,7 +1,9 @@ @using Unity.Flex.Web.Views.Shared.Components.QuestionNumberWidget +@using Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget @using Unity.Flex.Web.Views.Shared.Components.QuestionTextWidget @using Unity.Flex.Web.Views.Shared.Components.QuestionYesNoWidget @using Unity.Flex.Web.Views.Shared.Components.QuestionSelectListWidget +@using Unity.Flex.Web.Views.Shared.Components.TextAreaWidget @using Unity.GrantManager.Web.Views.Shared.Components.AssessmentScoresWidget; @using Unity.GrantManager.Web.Pages.GrantApplications; @using Unity.Flex.Scoresheets; @@ -47,13 +49,15 @@ var questionNumber = 1; @foreach (var question in sec.Fields.OrderBy(q => q.Order)) { + var convertedDefinition = question.Definition?.ConvertDefinition(question.Type); +

@@ -72,9 +76,9 @@ QuestionId = question.Id, IsDisabled = Model.IsDisabled(), Answer = Convert.ToDouble(string.IsNullOrEmpty(question.Answer) ? 0 : question.Answer), - Min = question.Definition?.ConvertDefinition(question.Type)?.GetMinValueOrNull(), - Max = question.Definition?.ConvertDefinition(question.Type)?.GetMaxValueOrNull(), - Required = question.Definition?.ConvertDefinition(question.Type)?.GetIsRequired() + Min = convertedDefinition?.GetMinValueOrNull(), + Max = convertedDefinition?.GetMaxValueOrNull(), + Required = convertedDefinition?.GetIsRequired() }) break; } @@ -85,9 +89,9 @@ QuestionId = question.Id, IsDisabled = Model.IsDisabled(), Answer = question.Answer, - YesValue = question.Definition?.ConvertDefinition(question.Type)?.GetYesValueOrNull(), - NoValue = question.Definition?.ConvertDefinition(question.Type)?.GetNoValueOrNull(), - Required = question.Definition?.ConvertDefinition(question.Type)?.GetIsRequired() + YesValue = convertedDefinition?.GetYesValueOrNull(), + NoValue = convertedDefinition?.GetNoValueOrNull(), + Required = convertedDefinition?.GetIsRequired() }) break; } @@ -98,9 +102,9 @@ QuestionId = question.Id, IsDisabled = Model.IsDisabled(), Answer = question.Answer, - MinLength = question.Definition?.ConvertDefinition(question.Type)?.GetMinLengthValueOrNull(), - MaxLength = question.Definition?.ConvertDefinition(question.Type)?.GetMaxLengthValueOrNull(), - Required = question.Definition?.ConvertDefinition(question.Type)?.GetIsRequired() + MinLength = convertedDefinition?.GetMinLengthValueOrNull(), + MaxLength = convertedDefinition?.GetMaxLengthValueOrNull(), + Required = convertedDefinition?.GetIsRequired() }) break; } @@ -112,7 +116,21 @@ IsDisabled = Model.IsDisabled(), Answer = question.Answer, Definition = question.Definition, - Required = question.Definition?.ConvertDefinition(question.Type)?.GetIsRequired() + Required = convertedDefinition?.GetIsRequired() + }) + break; + } + case QuestionType.TextArea: + { + @await Component.InvokeAsync(typeof(QuestionTextAreaWidget), new + { + QuestionId = question.Id, + IsDisabled = Model.IsDisabled(), + Answer = question.Answer, + MinLength = convertedDefinition?.GetMinLengthValueOrNull(), + MaxLength = convertedDefinition?.GetMaxLengthValueOrNull(), + Rows = convertedDefinition?.GetRowsOrZero(), + Required = convertedDefinition?.GetIsRequired() }) break; } From f9e78abb1a0bbb65e6f040d53cd4d4edcfb36d07 Mon Sep 17 00:00:00 2001 From: Andre Goncalves Date: Tue, 19 Nov 2024 16:49:59 -0800 Subject: [PATCH 2/9] AB#26446 cleanup --- .../Scoresheets/QuestionDto.cs | 5 +++++ .../Worksheets/Definitions/TextAreaDefinition.cs | 5 ++--- .../QuestionTextAreaViewModel.cs | 2 +- .../QuestionTextAreaWidget.cs | 4 ++-- .../Shared/Components/Scoresheet/Default.cshtml | 16 +++++++++++++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application.Contracts/Scoresheets/QuestionDto.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application.Contracts/Scoresheets/QuestionDto.cs index 25efc3334..a3d8178b5 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application.Contracts/Scoresheets/QuestionDto.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application.Contracts/Scoresheets/QuestionDto.cs @@ -54,5 +54,10 @@ public class QuestionDto : ExtensibleEntityDto { return JsonSerializer.Deserialize(Definition ?? "{}")?.Required.ToString(); } + + public uint? GetRowsValue() + { + return JsonSerializer.Deserialize(Definition ?? "{}")?.Rows; + } } } \ No newline at end of file diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/TextAreaDefinition.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/TextAreaDefinition.cs index 5f38bedca..00698a2d7 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/TextAreaDefinition.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/Worksheets/Definitions/TextAreaDefinition.cs @@ -1,5 +1,4 @@ -using Newtonsoft.Json; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace Unity.Flex.Worksheets.Definitions { @@ -11,7 +10,7 @@ public class TextAreaDefinition : CustomFieldDefinition [JsonPropertyName("maxLength")] public uint MaxLength { get; set; } = uint.MaxValue; - [JsonProperty("rows")] + [JsonPropertyName("rows")] public uint Rows { get; set; } = uint.MinValue; public TextAreaDefinition() : base() diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs index 69acf877d..db11c02f4 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaViewModel.cs @@ -9,6 +9,6 @@ public class QuestionTextAreaViewModel : RequiredFieldViewModel public string Answer { get; set; } = string.Empty; public string? MinLength { get; set; } public string? MaxLength { get; set; } - public uint? Rows { get; set; } = 0; + public uint? Rows { get; set; } = 1; } } diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs index ec22b9073..866591f70 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/QuestionTextAreaWidget/QuestionTextAreaWidget.cs @@ -7,7 +7,7 @@ namespace Unity.Flex.Web.Views.Shared.Components.QuestionTextAreaWidget { [Widget( - RefreshUrl = "Widgets/QuestionTextAreaWidget/Refresh", + RefreshUrl = "Widgets/QuestionTextArea/Refresh", AutoInitialize = true)] public class QuestionTextAreaWidget : AbpViewComponent { @@ -16,7 +16,7 @@ public async Task InvokeAsync(Guid questionId, string? answer, string? minLength, string? maxLength, - uint? rows = 0, + uint? rows = 1, bool required = false) { return View(await Task.FromResult(new QuestionTextAreaViewModel() diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Default.cshtml index 553e7b826..6a8f2148b 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Default.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Default.cshtml @@ -76,7 +76,21 @@
@foreach (var question in sec.Fields) { -
+
@question.Label From b21a51650d0267635dbf6e8b26acde539ac3a028 Mon Sep 17 00:00:00 2001 From: James Pasta Date: Wed, 20 Nov 2024 08:56:09 -0800 Subject: [PATCH 3/9] bugfix/AB#26065-Phone2Nullable --- ...1120005856_ApplicantPhone2Null.Designer.cs | 3293 +++++++++++++++++ .../20241120005856_ApplicantPhone2Null.cs | 38 + .../GrantTenantDbContextModelSnapshot.cs | 13 +- 3 files changed, 3337 insertions(+), 7 deletions(-) create mode 100644 applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.Designer.cs create mode 100644 applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.cs diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.Designer.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.Designer.cs new file mode 100644 index 000000000..5544f7ced --- /dev/null +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.Designer.cs @@ -0,0 +1,3293 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Unity.GrantManager.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Unity.GrantManager.Migrations.TenantMigrations +{ + [DbContext(typeof(GrantTenantDbContext))] + [Migration("20241120005856_ApplicantPhone2Null")] + partial class ApplicantPhone2Null + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "8.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Unity.Flex.Domain.ScoresheetInstances.ScoresheetInstance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnType("uuid"); + + b.Property("CorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ScoresheetId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ScoresheetId"); + + b.ToTable("ScoresheetInstances", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Answer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CurrentValue") + .HasColumnType("jsonb"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("QuestionId") + .HasColumnType("uuid"); + + b.Property("ScoresheetInstanceId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.HasIndex("ScoresheetInstanceId"); + + b.ToTable("Answers", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Question", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Label") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Order") + .HasColumnType("bigint"); + + b.Property("SectionId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("SectionId"); + + b.ToTable("Questions", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Scoresheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Order") + .HasColumnType("bigint"); + + b.Property("Published") + .HasColumnType("boolean"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("Scoresheets", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.ScoresheetSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Order") + .HasColumnType("bigint"); + + b.Property("ScoresheetId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ScoresheetId"); + + b.ToTable("ScoresheetSections", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetInstances.CustomFieldValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CurrentValue") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("CustomFieldId") + .HasColumnType("uuid"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("WorksheetInstanceId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("WorksheetInstanceId"); + + b.ToTable("CustomFieldValues", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetInstances.WorksheetInstance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnType("uuid"); + + b.Property("CorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CurrentValue") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiAnchor") + .IsRequired() + .HasColumnType("text"); + + b.Property("WorksheetCorrelationId") + .HasColumnType("uuid"); + + b.Property("WorksheetCorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("WorksheetId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.ToTable("WorksheetInstances", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetLinks.WorksheetLink", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnType("uuid"); + + b.Property("CorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiAnchor") + .IsRequired() + .HasColumnType("text"); + + b.Property("WorksheetId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("WorksheetId"); + + b.ToTable("WorksheetLinks", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.CustomField", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Key") + .IsRequired() + .HasColumnType("text"); + + b.Property("Label") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Order") + .HasColumnType("bigint"); + + b.Property("SectionId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("SectionId"); + + b.ToTable("CustomFields", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.Worksheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Published") + .HasColumnType("boolean"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("Worksheets", "Flex"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.WorksheetSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Order") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("WorksheetId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("WorksheetId"); + + b.ToTable("WorksheetSections", "Flex"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.Applicant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicantName") + .IsRequired() + .HasMaxLength(600) + .HasColumnType("character varying(600)"); + + b.Property("ApproxNumberOfEmployees") + .HasColumnType("text"); + + b.Property("BusinessNumber") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FiscalDay") + .HasColumnType("integer"); + + b.Property("FiscalMonth") + .HasColumnType("text"); + + b.Property("IndigenousOrgInd") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MatchPercentage") + .HasColumnType("numeric"); + + b.Property("NonRegisteredBusinessName") + .HasColumnType("text"); + + b.Property("OrgName") + .HasColumnType("text"); + + b.Property("OrgNumber") + .HasColumnType("text"); + + b.Property("OrgStatus") + .HasColumnType("text"); + + b.Property("OrganizationSize") + .HasColumnType("text"); + + b.Property("OrganizationType") + .HasColumnType("text"); + + b.Property("Sector") + .HasColumnType("text"); + + b.Property("SectorSubSectorIndustryDesc") + .HasColumnType("text"); + + b.Property("StartedOperatingDate") + .HasColumnType("date"); + + b.Property("Status") + .HasColumnType("text"); + + b.Property("SubSector") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UnityApplicantId") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantName"); + + b.ToTable("Applicants", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicantAddress", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AddressType") + .HasColumnType("integer"); + + b.Property("ApplicantId") + .IsRequired() + .HasColumnType("uuid"); + + b.Property("City") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Country") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Postal") + .HasColumnType("text"); + + b.Property("Province") + .HasColumnType("text"); + + b.Property("Street") + .HasColumnType("text"); + + b.Property("Street2") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantId"); + + b.ToTable("ApplicantAddresses", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicantAgent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicantId") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("BceidBusinessGuid") + .HasColumnType("uuid"); + + b.Property("BceidBusinessName") + .HasColumnType("text"); + + b.Property("BceidUserGuid") + .HasColumnType("uuid"); + + b.Property("BceidUserName") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactOrder") + .HasColumnType("integer"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Email") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IdentityEmail") + .HasColumnType("text"); + + b.Property("IdentityName") + .HasColumnType("text"); + + b.Property("IdentityProvider") + .HasColumnType("text"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("IsConfirmed") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OidcSubUser") + .HasColumnType("text"); + + b.Property("Phone") + .HasColumnType("text"); + + b.Property("Phone2") + .HasColumnType("text"); + + b.Property("Phone2Extension") + .HasColumnType("text"); + + b.Property("PhoneExtension") + .HasColumnType("text"); + + b.Property("RoleForApplicant") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantId"); + + b.HasIndex("ApplicationId") + .IsUnique(); + + b.HasIndex("OidcSubUser"); + + b.ToTable("ApplicantAgents", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.Application", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Acquisition") + .HasColumnType("text"); + + b.Property("ApplicantId") + .HasColumnType("uuid"); + + b.Property("ApplicationFormId") + .HasColumnType("uuid"); + + b.Property("ApplicationStatusId") + .HasColumnType("uuid"); + + b.Property("ApprovedAmount") + .HasColumnType("numeric"); + + b.Property("AssessmentResultDate") + .HasColumnType("timestamp without time zone"); + + b.Property("AssessmentResultStatus") + .HasColumnType("text"); + + b.Property("AssessmentStartDate") + .HasColumnType("timestamp without time zone"); + + b.Property("City") + .HasColumnType("text"); + + b.Property("Community") + .HasColumnType("text"); + + b.Property("CommunityPopulation") + .HasColumnType("integer"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractExecutionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ContractNumber") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeclineRational") + .HasColumnType("text"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DueDate") + .HasColumnType("timestamp without time zone"); + + b.Property("DueDiligenceStatus") + .HasColumnType("text"); + + b.Property("EconomicRegion") + .HasColumnType("text"); + + b.Property("ElectoralDistrict") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FinalDecisionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("Forestry") + .HasColumnType("text"); + + b.Property("ForestryFocus") + .HasColumnType("text"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LikelihoodOfFunding") + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("NotificationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("OwnerId") + .HasColumnType("uuid"); + + b.Property("Payload") + .HasColumnType("jsonb"); + + b.Property("PercentageTotalProjectBudget") + .HasColumnType("double precision"); + + b.Property("Place") + .HasColumnType("text"); + + b.Property("ProjectEndDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ProjectFundingTotal") + .HasColumnType("numeric"); + + b.Property("ProjectName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ProjectStartDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ProjectSummary") + .HasColumnType("text"); + + b.Property("ProposalDate") + .HasColumnType("timestamp without time zone"); + + b.Property("RecommendedAmount") + .HasColumnType("numeric"); + + b.Property("ReferenceNo") + .IsRequired() + .HasColumnType("text"); + + b.Property("RegionalDistrict") + .HasColumnType("text"); + + b.Property("RequestedAmount") + .HasColumnType("numeric"); + + b.Property("RiskRanking") + .HasColumnType("text"); + + b.Property("SigningAuthorityBusinessPhone") + .HasColumnType("text"); + + b.Property("SigningAuthorityCellPhone") + .HasColumnType("text"); + + b.Property("SigningAuthorityEmail") + .HasColumnType("text"); + + b.Property("SigningAuthorityFullName") + .HasColumnType("text"); + + b.Property("SigningAuthorityTitle") + .HasColumnType("text"); + + b.Property("SubStatus") + .HasColumnType("text"); + + b.Property("SubmissionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TotalProjectBudget") + .HasColumnType("numeric"); + + b.Property("TotalScore") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantId"); + + b.HasIndex("ApplicationFormId"); + + b.HasIndex("ApplicationStatusId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Applications", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationAssignment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AssigneeId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Duty") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.HasIndex("AssigneeId"); + + b.ToTable("ApplicationAssignments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationAttachment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("S3ObjectKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Time") + .HasColumnType("timestamp without time zone"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.ToTable("ApplicationAttachments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationChefsFileAttachment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ChefsFileId") + .HasColumnType("text"); + + b.Property("ChefsSumbissionId") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.ToTable("ApplicationChefsFileAttachments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationContact", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasColumnType("text"); + + b.Property("ContactFullName") + .IsRequired() + .HasColumnType("text"); + + b.Property("ContactMobilePhone") + .HasColumnType("text"); + + b.Property("ContactTitle") + .HasColumnType("text"); + + b.Property("ContactType") + .IsRequired() + .HasColumnType("text"); + + b.Property("ContactWorkPhone") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.ToTable("ApplicationContact", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationForm", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApiKey") + .HasColumnType("text"); + + b.Property("ApplicationFormDescription") + .HasColumnType("text"); + + b.Property("ApplicationFormName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AttemptedConnectionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("AvailableChefsFields") + .HasColumnType("text"); + + b.Property("Category") + .HasColumnType("text"); + + b.Property("ChefsApplicationFormGuid") + .HasColumnType("text"); + + b.Property("ChefsCriteriaFormGuid") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConnectionHttpStatus") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IntakeId") + .HasColumnType("uuid"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payable") + .HasColumnType("boolean"); + + b.Property("RenderFormIoToHtml") + .HasColumnType("boolean"); + + b.Property("ScoresheetId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("IntakeId"); + + b.ToTable("ApplicationForms", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationFormSubmission", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicantId") + .HasColumnType("uuid"); + + b.Property("ApplicationFormId") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ChefsSubmissionGuid") + .IsRequired() + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FormVersionId") + .HasColumnType("uuid"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OidcSub") + .IsRequired() + .HasColumnType("text"); + + b.Property("RenderedHTML") + .HasColumnType("text"); + + b.Property("Submission") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantId"); + + b.HasIndex("ApplicationFormId"); + + b.ToTable("ApplicationFormSubmissions", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationFormVersion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationFormId") + .HasColumnType("uuid"); + + b.Property("AvailableChefsFields") + .HasColumnType("text"); + + b.Property("ChefsApplicationFormGuid") + .HasColumnType("text"); + + b.Property("ChefsFormVersionGuid") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Published") + .HasColumnType("boolean"); + + b.Property("SubmissionHeaderMapping") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationFormId"); + + b.ToTable("ApplicationFormVersion", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationLink", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LinkedApplicationId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.ToTable("ApplicationLinks", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationStatus", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExternalStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("InternalStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("StatusCode") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("character varying(250)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("StatusCode") + .IsUnique(); + + b.ToTable("ApplicationStatuses", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationTags", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("character varying(250)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.ToTable("ApplicationTags", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.AssessmentAttachment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AssessmentId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("S3ObjectKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Time") + .HasColumnType("timestamp without time zone"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("AssessmentId"); + + b.ToTable("AssessmentAttachments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Assessments.Assessment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ApprovalRecommended") + .HasColumnType("boolean"); + + b.Property("AssessorId") + .HasColumnType("uuid"); + + b.Property("CleanGrowth") + .HasColumnType("integer"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EconomicImpact") + .HasColumnType("integer"); + + b.Property("EndDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FinancialAnalysis") + .HasColumnType("integer"); + + b.Property("InclusiveGrowth") + .HasColumnType("integer"); + + b.Property("IsComplete") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.HasIndex("AssessorId"); + + b.ToTable("Assessments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Comments.ApplicationComment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text"); + + b.Property("CommenterId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.HasIndex("CommenterId"); + + b.ToTable("ApplicationComments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Comments.AssessmentComment", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AssessmentId") + .HasColumnType("uuid"); + + b.Property("Comment") + .IsRequired() + .HasColumnType("text"); + + b.Property("CommenterId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AssessmentId"); + + b.HasIndex("CommenterId"); + + b.ToTable("AssessmentComments", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Identity.Person", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Badge") + .IsRequired() + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OidcDisplayName") + .IsRequired() + .HasColumnType("text"); + + b.Property("OidcSub") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("OidcSub"); + + b.ToTable("Persons", (string)null); + }); + + modelBuilder.Entity("Unity.GrantManager.Intakes.Intake", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Budget") + .HasColumnType("double precision"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("EndDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IntakeName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("StartDate") + .HasColumnType("timestamp without time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Intakes", (string)null); + }); + + modelBuilder.Entity("Unity.Notifications.Emails.EmailLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicantId") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AssessmentId") + .HasColumnType("uuid"); + + b.Property("BCC") + .IsRequired() + .HasColumnType("text"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text"); + + b.Property("BodyType") + .IsRequired() + .HasColumnType("text"); + + b.Property("CC") + .IsRequired() + .HasColumnType("text"); + + b.Property("ChesMsgId") + .HasColumnType("uuid"); + + b.Property("ChesResponse") + .IsRequired() + .HasColumnType("text"); + + b.Property("ChesStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FromAddress") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Priority") + .IsRequired() + .HasColumnType("text"); + + b.Property("RetryAttempts") + .HasColumnType("integer"); + + b.Property("SendOnDateTime") + .HasColumnType("timestamp without time zone"); + + b.Property("SentDateTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Subject") + .IsRequired() + .HasColumnType("text"); + + b.Property("Tag") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("ToAddress") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("EmailLogs", "Notifications"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentConfigurations.PaymentConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MinistryClient") + .HasColumnType("text"); + + b.Property("PaymentIdPrefix") + .IsRequired() + .HasColumnType("text"); + + b.Property("PaymentThreshold") + .HasColumnType("numeric"); + + b.Property("ProjectNumber") + .HasColumnType("text"); + + b.Property("Responsibility") + .HasColumnType("text"); + + b.Property("ServiceLine") + .HasColumnType("text"); + + b.Property("Stob") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("PaymentConfigurations", "Payments"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentRequests.ExpenseApproval", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DecisionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PaymentRequestId") + .HasColumnType("uuid"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("PaymentRequestId"); + + b.ToTable("ExpenseApprovals", "Payments"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentRequests.PaymentRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("numeric"); + + b.Property("CasHttpStatusCode") + .HasColumnType("integer"); + + b.Property("CasResponse") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("CorrelationId") + .HasColumnType("uuid"); + + b.Property("CorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("InvoiceNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("InvoiceStatus") + .HasColumnType("text"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsRecon") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayeeName") + .IsRequired() + .HasColumnType("text"); + + b.Property("PaymentDate") + .HasColumnType("text"); + + b.Property("PaymentNumber") + .HasColumnType("text"); + + b.Property("PaymentStatus") + .HasColumnType("text"); + + b.Property("ReferenceNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequesterName") + .IsRequired() + .HasColumnType("text"); + + b.Property("SiteId") + .HasColumnType("uuid"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("SupplierNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ReferenceNumber") + .IsUnique(); + + b.HasIndex("SiteId"); + + b.ToTable("PaymentRequests", "Payments"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.Suppliers.Site", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AddressLine1") + .HasColumnType("text"); + + b.Property("AddressLine2") + .HasColumnType("text"); + + b.Property("AddressLine3") + .HasColumnType("text"); + + b.Property("City") + .HasColumnType("text"); + + b.Property("Country") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("EFTAdvicePref") + .HasColumnType("text"); + + b.Property("EmailAddress") + .HasColumnType("text"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastUpdatedInCas") + .HasColumnType("timestamp without time zone"); + + b.Property("Number") + .IsRequired() + .HasColumnType("text"); + + b.Property("PaymentGroup") + .HasColumnType("integer"); + + b.Property("PostalCode") + .HasColumnType("text"); + + b.Property("ProviderId") + .HasColumnType("text"); + + b.Property("Province") + .HasColumnType("text"); + + b.Property("SiteProtected") + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("text"); + + b.Property("SupplierId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierId"); + + b.ToTable("Sites", "Payments"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.Suppliers.Supplier", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("BusinessNumber") + .HasColumnType("text"); + + b.Property("City") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnType("uuid"); + + b.Property("CorrelationProvider") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastUpdatedInCAS") + .HasColumnType("timestamp without time zone"); + + b.Property("MailingAddress") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Number") + .HasColumnType("text"); + + b.Property("PostalCode") + .HasColumnType("text"); + + b.Property("ProviderId") + .HasColumnType("text"); + + b.Property("Province") + .HasColumnType("text"); + + b.Property("SIN") + .HasColumnType("text"); + + b.Property("StandardIndustryClassification") + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("text"); + + b.Property("Subcategory") + .HasColumnType("text"); + + b.Property("SupplierProtected") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Suppliers", "Payments"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.ScoresheetInstances.ScoresheetInstance", b => + { + b.HasOne("Unity.Flex.Domain.Scoresheets.Scoresheet", "Scoresheet") + .WithMany("Instances") + .HasForeignKey("ScoresheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scoresheet"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Answer", b => + { + b.HasOne("Unity.Flex.Domain.Scoresheets.Question", "Question") + .WithMany("Answers") + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.Flex.Domain.ScoresheetInstances.ScoresheetInstance", null) + .WithMany("Answers") + .HasForeignKey("ScoresheetInstanceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Question", b => + { + b.HasOne("Unity.Flex.Domain.Scoresheets.ScoresheetSection", "Section") + .WithMany("Fields") + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.ScoresheetSection", b => + { + b.HasOne("Unity.Flex.Domain.Scoresheets.Scoresheet", "Scoresheet") + .WithMany("Sections") + .HasForeignKey("ScoresheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scoresheet"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetInstances.CustomFieldValue", b => + { + b.HasOne("Unity.Flex.Domain.WorksheetInstances.WorksheetInstance", null) + .WithMany("Values") + .HasForeignKey("WorksheetInstanceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetLinks.WorksheetLink", b => + { + b.HasOne("Unity.Flex.Domain.Worksheets.Worksheet", "Worksheet") + .WithMany("Links") + .HasForeignKey("WorksheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Worksheet"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.CustomField", b => + { + b.HasOne("Unity.Flex.Domain.Worksheets.WorksheetSection", "Section") + .WithMany("Fields") + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.WorksheetSection", b => + { + b.HasOne("Unity.Flex.Domain.Worksheets.Worksheet", "Worksheet") + .WithMany("Sections") + .HasForeignKey("WorksheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Worksheet"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicantAddress", b => + { + b.HasOne("Unity.GrantManager.Applications.Applicant", "Applicant") + .WithMany("ApplicantAddresses") + .HasForeignKey("ApplicantId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Applicant"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicantAgent", b => + { + b.HasOne("Unity.GrantManager.Applications.Applicant", null) + .WithMany() + .HasForeignKey("ApplicantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Applications.Application", "Application") + .WithOne("ApplicantAgent") + .HasForeignKey("Unity.GrantManager.Applications.ApplicantAgent", "ApplicationId"); + + b.HasOne("Unity.GrantManager.Identity.Person", null) + .WithMany() + .HasForeignKey("OidcSubUser") + .HasPrincipalKey("OidcSub"); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.Application", b => + { + b.HasOne("Unity.GrantManager.Applications.Applicant", "Applicant") + .WithMany() + .HasForeignKey("ApplicantId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Applications.ApplicationForm", "ApplicationForm") + .WithMany() + .HasForeignKey("ApplicationFormId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Applications.ApplicationStatus", "ApplicationStatus") + .WithMany("Applications") + .HasForeignKey("ApplicationStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Identity.Person", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Applicant"); + + b.Navigation("ApplicationForm"); + + b.Navigation("ApplicationStatus"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationAssignment", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", "Application") + .WithMany("ApplicationAssignments") + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Identity.Person", "Assignee") + .WithMany() + .HasForeignKey("AssigneeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Application"); + + b.Navigation("Assignee"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationAttachment", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", null) + .WithMany() + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationChefsFileAttachment", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", null) + .WithMany() + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationContact", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", null) + .WithMany() + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationForm", b => + { + b.HasOne("Unity.GrantManager.Intakes.Intake", null) + .WithMany() + .HasForeignKey("IntakeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationFormSubmission", b => + { + b.HasOne("Unity.GrantManager.Applications.Applicant", null) + .WithMany() + .HasForeignKey("ApplicantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Applications.ApplicationForm", null) + .WithMany() + .HasForeignKey("ApplicationFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationFormVersion", b => + { + b.HasOne("Unity.GrantManager.Applications.ApplicationForm", null) + .WithMany() + .HasForeignKey("ApplicationFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationLink", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", null) + .WithMany() + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationTags", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", "Application") + .WithMany("ApplicationTags") + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.AssessmentAttachment", b => + { + b.HasOne("Unity.GrantManager.Assessments.Assessment", null) + .WithMany() + .HasForeignKey("AssessmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Assessments.Assessment", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", "Application") + .WithMany("Assessments") + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Identity.Person", null) + .WithMany() + .HasForeignKey("AssessorId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Unity.GrantManager.Comments.ApplicationComment", b => + { + b.HasOne("Unity.GrantManager.Applications.Application", null) + .WithMany() + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Identity.Person", null) + .WithMany() + .HasForeignKey("CommenterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.GrantManager.Comments.AssessmentComment", b => + { + b.HasOne("Unity.GrantManager.Assessments.Assessment", null) + .WithMany() + .HasForeignKey("AssessmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Unity.GrantManager.Identity.Person", null) + .WithMany() + .HasForeignKey("CommenterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentRequests.ExpenseApproval", b => + { + b.HasOne("Unity.Payments.Domain.PaymentRequests.PaymentRequest", "PaymentRequest") + .WithMany("ExpenseApprovals") + .HasForeignKey("PaymentRequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaymentRequest"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentRequests.PaymentRequest", b => + { + b.HasOne("Unity.Payments.Domain.Suppliers.Site", "Site") + .WithMany() + .HasForeignKey("SiteId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.Suppliers.Site", b => + { + b.HasOne("Unity.Payments.Domain.Suppliers.Supplier", "Supplier") + .WithMany("Sites") + .HasForeignKey("SupplierId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Supplier"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.ScoresheetInstances.ScoresheetInstance", b => + { + b.Navigation("Answers"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Question", b => + { + b.Navigation("Answers"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.Scoresheet", b => + { + b.Navigation("Instances"); + + b.Navigation("Sections"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Scoresheets.ScoresheetSection", b => + { + b.Navigation("Fields"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.WorksheetInstances.WorksheetInstance", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.Worksheet", b => + { + b.Navigation("Links"); + + b.Navigation("Sections"); + }); + + modelBuilder.Entity("Unity.Flex.Domain.Worksheets.WorksheetSection", b => + { + b.Navigation("Fields"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.Applicant", b => + { + b.Navigation("ApplicantAddresses"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.Application", b => + { + b.Navigation("ApplicantAgent"); + + b.Navigation("ApplicationAssignments"); + + b.Navigation("ApplicationTags"); + + b.Navigation("Assessments"); + }); + + modelBuilder.Entity("Unity.GrantManager.Applications.ApplicationStatus", b => + { + b.Navigation("Applications"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.PaymentRequests.PaymentRequest", b => + { + b.Navigation("ExpenseApprovals"); + }); + + modelBuilder.Entity("Unity.Payments.Domain.Suppliers.Supplier", b => + { + b.Navigation("Sites"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.cs new file mode 100644 index 000000000..c63857d40 --- /dev/null +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20241120005856_ApplicantPhone2Null.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Unity.GrantManager.Migrations.TenantMigrations +{ + /// + public partial class ApplicantPhone2Null : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Phone2", + table: "ApplicantAgents", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Phone2", + table: "ApplicantAgents", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + } + } +} diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/GrantTenantDbContextModelSnapshot.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/GrantTenantDbContextModelSnapshot.cs index e855fdae8..2d157b8b2 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/GrantTenantDbContextModelSnapshot.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/GrantTenantDbContextModelSnapshot.cs @@ -817,6 +817,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uuid") .HasColumnName("LastModifierId"); + b.Property("MatchPercentage") + .HasColumnType("numeric"); + b.Property("NonRegisteredBusinessName") .HasColumnType("text"); @@ -1021,10 +1024,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Phone2") .HasColumnType("text"); - b.Property("PhoneExtension") + b.Property("Phone2Extension") .HasColumnType("text"); - b.Property("PhoneExtension2") + b.Property("PhoneExtension") .HasColumnType("text"); b.Property("RoleForApplicant") @@ -2980,9 +2983,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasOne("Unity.GrantManager.Applications.Application", "Application") .WithOne("ApplicantAgent") - .HasForeignKey("Unity.GrantManager.Applications.ApplicantAgent", "ApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("Unity.GrantManager.Applications.ApplicantAgent", "ApplicationId"); b.HasOne("Unity.GrantManager.Identity.Person", null) .WithMany() @@ -3256,8 +3257,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Unity.GrantManager.Applications.Applicant", b => { b.Navigation("ApplicantAddresses"); - - b.Navigation("ApplicantAgent"); }); modelBuilder.Entity("Unity.GrantManager.Applications.Application", b => From 4bda65e7b413f1f29533ff5c51069a373d90ad34 Mon Sep 17 00:00:00 2001 From: "Lavoie, Patrick" <135162612+plavoie-BC@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:30:20 -0800 Subject: [PATCH 4/9] AB#27077 - Include Components\**\*.js on build --- .../Unity.GrantManager.Web/Unity.GrantManager.Web.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Unity.GrantManager.Web.csproj b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Unity.GrantManager.Web.csproj index 7a0065bec..a2aca3298 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Unity.GrantManager.Web.csproj +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Unity.GrantManager.Web.csproj @@ -41,6 +41,12 @@ Always + + Always + + + Always + From 40bb702d05a4a61c2a91e6eadf36e3d95fb4471f Mon Sep 17 00:00:00 2001 From: "Lavoie, Patrick" <135162612+plavoie-BC@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:32:09 -0800 Subject: [PATCH 5/9] AB#27077 - Set Funding Agreement tab to be visible by default --- .../Settings/GrantManagerSettingDefinitionProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Settings/GrantManagerSettingDefinitionProvider.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Settings/GrantManagerSettingDefinitionProvider.cs index d44898797..63c8a0b19 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Settings/GrantManagerSettingDefinitionProvider.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Settings/GrantManagerSettingDefinitionProvider.cs @@ -27,7 +27,7 @@ public override void Define(ISettingDefinitionContext context) { SettingsConstants.UI.Tabs.Project, true }, { SettingsConstants.UI.Tabs.Applicant, true }, { SettingsConstants.UI.Tabs.Payments, true }, - { SettingsConstants.UI.Tabs.FundingAgreement, false } + { SettingsConstants.UI.Tabs.FundingAgreement, true } }; foreach (var setting in tabSettings) From 8b08957496e18be920bb40e6014fc1f138c987e0 Mon Sep 17 00:00:00 2001 From: Andre Goncalves Date: Wed, 20 Nov 2024 10:21:28 -0800 Subject: [PATCH 6/9] AB#26446 add missing resolver --- .../modules/Unity.Flex/src/Unity.Flex.Shared/ValueResolver.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/ValueResolver.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/ValueResolver.cs index 16a38a43a..636a11f59 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/ValueResolver.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Shared/ValueResolver.cs @@ -38,6 +38,7 @@ public static class ValueResolver QuestionType.Number => ResolveNumber(currentValue), QuestionType.YesNo => JsonSerializer.Deserialize(currentValue)?.Value, QuestionType.SelectList => JsonSerializer.Deserialize(currentValue)?.Value, + QuestionType.TextArea => JsonSerializer.Deserialize(currentValue)?.Value, _ => throw new NotImplementedException() }; From 468859c0aa2cb48050a6ddcee71051241411b34f Mon Sep 17 00:00:00 2001 From: samsaravillo <7529759+samsaravillo@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:41:48 -0800 Subject: [PATCH 7/9] ab#26672 fix crashing when enter is pressed --- .../Shared/Components/AssessmentScoresWidget/Default.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml index 7c1efb598..db0ea2f35 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml @@ -59,7 +59,7 @@
-
+

@question.Description

@switch (question.Type) From a0e0e4977dabaa6a733ad00772a7e2aff28f7b6f Mon Sep 17 00:00:00 2001 From: Andre Goncalves Date: Wed, 20 Nov 2024 10:43:43 -0800 Subject: [PATCH 8/9] AB#26446 address sonarqube scans --- .../Shared/Components/AssessmentScoresWidget/Default.cshtml | 3 --- 1 file changed, 3 deletions(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml index 824e22eb2..f5dcb4a11 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/AssessmentScoresWidget/Default.cshtml @@ -3,11 +3,8 @@ @using Unity.Flex.Web.Views.Shared.Components.QuestionTextWidget @using Unity.Flex.Web.Views.Shared.Components.QuestionYesNoWidget @using Unity.Flex.Web.Views.Shared.Components.QuestionSelectListWidget -@using Unity.Flex.Web.Views.Shared.Components.TextAreaWidget @using Unity.GrantManager.Web.Views.Shared.Components.AssessmentScoresWidget; -@using Unity.GrantManager.Web.Pages.GrantApplications; @using Unity.Flex.Scoresheets; -@using Unity.Flex.Web.Views.Shared.Components; @using Unity.Flex; @model AssessmentScoresWidgetViewModel From b59f3602d7f18375e85e20cb94e98f33875bbb39 Mon Sep 17 00:00:00 2001 From: Andre Goncalves Date: Wed, 20 Nov 2024 13:46:50 -0800 Subject: [PATCH 9/9] AB#27104 fix mapping for dynamic types that are nested, and add panel as valid container type --- .../Mapping/InputComponentProcessor.cs | 11 +- .../Intake/BasicIntakeMappingTests.cs | 58 ++ .../Intake/Mapping/basicdatagrid.json | 895 ++++++++++++++++++ .../Intake/Mapping/panelinpaneldatagrid.json | 494 ++++++++++ .../Unity.GrantManager.Domain.Tests.csproj | 6 + 5 files changed, 1462 insertions(+), 2 deletions(-) create mode 100644 applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/BasicIntakeMappingTests.cs create mode 100644 applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/basicdatagrid.json create mode 100644 applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/panelinpaneldatagrid.json diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Intakes/Mapping/InputComponentProcessor.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Intakes/Mapping/InputComponentProcessor.cs index dbbf33a0b..2cfd5361f 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Intakes/Mapping/InputComponentProcessor.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Intakes/Mapping/InputComponentProcessor.cs @@ -31,7 +31,8 @@ public static void InitializeLogger(ILoggerFactory loggerFactory) "simpleparagraph", "simpletabs", "container", - "columns" + "columns", + "panel" ]; private static readonly List columnTypes = @@ -120,6 +121,12 @@ public void ConsumeToken(JToken? token) string subSubTokenString = GetSubLookupType(subTokenType); + // Any dynamic types, get the parent and children tokens + if (subTokenType != null && dynamicTypes.Contains(subTokenType)) + { + AddComponent(token); + } + var nestedComponentsComponents = ((JObject)token).SelectToken(subSubTokenString); if (nestedComponentsComponents != null) { @@ -174,7 +181,7 @@ private void ProcessNestedComponents(JToken childToken, JToken? tokenType) // Safely select nested components var nestedComponents = childToken.SelectToken(subTokenString); - // If there are nested components, process them + // If there are nested components, process them if (nestedComponents != null) { foreach (var nestedTokenComponent in nestedComponents.Children()) diff --git a/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/BasicIntakeMappingTests.cs b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/BasicIntakeMappingTests.cs new file mode 100644 index 000000000..0c9b76747 --- /dev/null +++ b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/BasicIntakeMappingTests.cs @@ -0,0 +1,58 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using NSubstitute; +using Shouldly; +using System; +using System.IO; +using Unity.GrantManager.Applications; +using Unity.GrantManager.Intakes; +using Xunit; + +namespace Unity.GrantManager.Intake +{ + public class BasicIntakeMappingTests : GrantManagerDomainTestBase + { + private readonly IIntakeFormSubmissionMapper _intakeFormSubmissionMapper; + private readonly IApplicationChefsFileAttachmentRepository _applicationChefsFileAttachmentRepository; + + public BasicIntakeMappingTests() + { + _applicationChefsFileAttachmentRepository = Substitute.For(); + _intakeFormSubmissionMapper = new IntakeFormSubmissionMapper(_applicationChefsFileAttachmentRepository); + } + + private static dynamic? LoadTestData(string filename) + { + var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Intake\\Mapping\\" + filename); + var reader = new StreamReader(filePath); + var jsonStr = reader.ReadToEnd(); + var testData = JsonConvert.DeserializeObject(jsonStr); + reader.Dispose(); + return testData; + } + + + [Theory] + [InlineData("basicdatagrid.json", 2)] + [InlineData("panelinpaneldatagrid.json", 1)] + public void TestBasicDataGridMapping(string filename, int expectedDatagridCount) + { + dynamic? formMapping = LoadTestData(filename); + string result = _intakeFormSubmissionMapper.InitializeAvailableFormFields(formMapping); + result.ShouldNotBeNull(); + + var parsedJson = JObject.Parse(result); + int datagridCount = 0; + + foreach (var property in parsedJson.Properties()) + { + var value = JObject.Parse(property.Value.ToString()); + if (value["type"]?.ToString() == "datagrid") + { + datagridCount++; + } + } + Assert.Equal(expectedDatagridCount, datagridCount); + } + } +} diff --git a/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/basicdatagrid.json b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/basicdatagrid.json new file mode 100644 index 000000000..9411848d3 --- /dev/null +++ b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/basicdatagrid.json @@ -0,0 +1,895 @@ +{ + "id": "2b622503-d03f-48b6-8e88-cbd2d2a21c6f", + "formId": "4b892695-350e-4b43-a9e0-821a7c60ebe8", + "version": 5, + "schema": { + "type": "form", + "display": "form", + "components": [ + { + "id": "eazagst", + "key": "projectStage1", + "tree": true, + "type": "datagrid", + "input": true, + "label": "Project Stage #1", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "reorder": false, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": true, + "initEmpty": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "components": [ + { + "id": "e0r1fv", + "key": "stage2MajorProjectMilestones", + "mask": false, + "rows": 3, + "type": "simpletextareaadvanced", + "input": true, + "label": "Stage #1: Major Project Milestones", + "addons": [], + "editor": "", + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "wysiwyg": false, + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "pattern": "", + "maxWords": "", + "minWords": "", + "multiple": false, + "required": false, + "maxLength": "", + "minLength": "", + "isUseForCopy": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "fixedSize": true, + "hideLabel": false, + "inputMask": "", + "inputType": "text", + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": true, + "attributes": {}, + "autoExpand": false, + "errorLabel": "", + "persistent": true, + "properties": {}, + "spellcheck": true, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "displayMask": "", + "inputFormat": "plain", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false, + "truncateMultipleSpaces": false + }, + { + "id": "ekwcom9", + "key": "simpledatetimeadvanced1", + "type": "simpledatetimeadvanced", + "input": true, + "label": "Anticipated Start (mm/dd/yy)", + "addons": [], + "format": "MM-dd-yy", + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "mode": "single", + "type": "calendar", + "format": "MM-dd-yy", + "locale": "en", + "maxDate": null, + "minDate": null, + "time_24hr": false, + "allowInput": true, + "enableTime": false, + "noCalendar": false, + "hourIncrement": 1, + "disableWeekdays": false, + "disableWeekends": false, + "minuteIncrement": 1, + "displayInTimezone": "viewer", + "useLocaleSettings": false + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "timezone": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "isUseForCopy": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "allowInput": true, + "attributes": {}, + "datePicker": { + "maxDate": null, + "maxMode": "year", + "minDate": null, + "minMode": "day", + "initDate": "", + "yearRows": 4, + "showWeeks": true, + "startingDay": 0, + "yearColumns": 5, + "disableWeekdays": false, + "disableWeekends": false + }, + "enableDate": true, + "enableTime": false, + "errorLabel": "", + "persistent": true, + "properties": {}, + "timePicker": { + "hourStep": 1, + "arrowkeys": true, + "minuteStep": 1, + "mousewheel": true, + "showMeridian": true, + "readonlyInput": false + }, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "defaultDate": "", + "description": "", + "placeholder": "", + "defaultValue": "", + "customOptions": {}, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "datepickerMode": "day", + "calculateServer": false, + "displayInTimezone": "viewer", + "useLocaleSettings": false, + "allowMultipleMasks": false, + "customDefaultValue": "", + "enableMaxDateInput": false, + "enableMinDateInput": false, + "allowCalculateOverride": false + }, + { + "id": "etwfkta", + "key": "simpledatetimeadvanced2", + "type": "simpledatetimeadvanced", + "input": true, + "label": "Anticipated Completion (mm/dd/yy)", + "addons": [], + "format": "MM-dd-yy", + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "mode": "single", + "type": "calendar", + "format": "MM-dd-yy", + "locale": "en", + "maxDate": null, + "minDate": null, + "time_24hr": false, + "allowInput": true, + "enableTime": false, + "noCalendar": false, + "hourIncrement": 1, + "disableWeekdays": false, + "disableWeekends": false, + "minuteIncrement": 1, + "displayInTimezone": "viewer", + "useLocaleSettings": false + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "timezone": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "isUseForCopy": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "allowInput": true, + "attributes": {}, + "datePicker": { + "maxDate": null, + "maxMode": "year", + "minDate": null, + "minMode": "day", + "initDate": "", + "yearRows": 4, + "showWeeks": true, + "startingDay": 0, + "yearColumns": 5, + "disableWeekdays": false, + "disableWeekends": false + }, + "enableDate": true, + "enableTime": false, + "errorLabel": "", + "persistent": true, + "properties": {}, + "timePicker": { + "hourStep": 1, + "arrowkeys": true, + "minuteStep": 1, + "mousewheel": true, + "showMeridian": true, + "readonlyInput": false + }, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "defaultDate": "", + "description": "", + "placeholder": "", + "defaultValue": "", + "customOptions": {}, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "datepickerMode": "day", + "calculateServer": false, + "displayInTimezone": "viewer", + "useLocaleSettings": false, + "allowMultipleMasks": false, + "customDefaultValue": "", + "enableMaxDateInput": false, + "enableMinDateInput": false, + "allowCalculateOverride": false + }, + { + "id": "e0rhl2e", + "key": "approximateCost", + "mask": false, + "type": "simplecurrencyadvanced", + "input": true, + "label": "Approximate Cost", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "currency": "USD", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "max": "", + "min": "", + "step": "any", + "custom": "", + "unique": false, + "integer": "", + "multiple": false, + "required": false, + "isUseForCopy": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "delimiter": true, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": { + "style": "width: 250px" + }, + "errorLabel": "", + "persistent": true, + "properties": {}, + "spellcheck": true, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "inputFormat": "plain", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false, + "truncateMultipleSpaces": false + } + ], + "errorLabel": "", + "persistent": true, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "layoutFixed": false, + "placeholder": "", + "defaultValue": [ + { + "anticipatedStartMmDdYy": "", + "anticipatedStartMmDdYy1": "", + "simpledatetimeadvanced1": "", + "simpledatetimeadvanced2": "", + "stage1MajorProjectMilestones": "", + "stage2MajorProjectMilestones": "" + } + ], + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "enableRowGroups": false, + "addAnotherPosition": "bottom", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false, + "disableAddingRemovingRows": false + }, + { + "id": "elreoep", + "key": "simplepanel", + "tree": false, + "type": "simplepanel", + "input": false, + "label": "Panel", + "theme": "default", + "title": "Panel", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "collapsed": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "breadcrumb": "default", + "components": [ + { + "id": "ed52p0n", + "key": "dataGridInPanel", + "tags": [], + "tree": true, + "type": "datagrid", + "input": true, + "label": "Data Grid", + "logic": [], + "addons": [], + "errors": "", + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "page": "", + "style": "", + "width": "", + "height": "" + }, + "reorder": false, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "json": "", + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "maxLength": "", + "minLength": "", + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "initEmpty": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "addAnother": "", + "attributes": {}, + "components": [ + { + "id": "e3upvf", + "key": "simpletextfield", + "case": "", + "mask": false, + "type": "simpletextfield", + "input": true, + "label": "Text Field", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "pattern": "", + "multiple": false, + "required": false, + "maxLength": "", + "minLength": "", + "isUseForCopy": false, + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "inputMask": "", + "inputType": "text", + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": true, + "properties": {}, + "spellcheck": true, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "displayMask": "", + "inputFormat": "plain", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false, + "truncateMultipleSpaces": false + }, + { + "id": "ehswih", + "key": "simplenumber", + "type": "simplenumber", + "input": true, + "label": "Number", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "max": "", + "min": "", + "step": "any", + "custom": "", + "unique": false, + "integer": "", + "multiple": false, + "required": false, + "isUseForCopy": false, + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "delimiter": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": true, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "requireDecimal": false, + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + } + ], + "errorLabel": "", + "persistent": true, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "layoutFixed": false, + "placeholder": "", + "defaultValue": [ + {} + ], + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "enableRowGroups": false, + "customConditional": "", + "addAnotherPosition": "bottom", + "allowMultipleMasks": false, + "customDefaultValue": "", + "conditionalAddButton": "", + "allowCalculateOverride": false, + "disableAddingRemovingRows": false + } + ], + "errorLabel": "", + "persistent": false, + "properties": {}, + "validateOn": "change", + "clearOnHide": false, + "collapsible": false, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + }, + { + "id": "edh5y24w", + "key": "submit", + "size": "md", + "type": "button", + "block": false, + "input": true, + "label": "Submit", + "theme": "primary", + "action": "submit", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "leftIcon": "", + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "rightIcon": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": false, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": true, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "disableOnInvalid": true, + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + } + ] + }, + "createdBy": "AGONCALV@idir", + "createdAt": "2024-11-20T17:38:04.667Z", + "updatedBy": null, + "updatedAt": "2024-11-20T17:38:04.662Z", + "published": true +} \ No newline at end of file diff --git a/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/panelinpaneldatagrid.json b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/panelinpaneldatagrid.json new file mode 100644 index 000000000..8dc392b72 --- /dev/null +++ b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Intake/Mapping/panelinpaneldatagrid.json @@ -0,0 +1,494 @@ +{ + "id": "00080491-8a2c-4dc4-b0b0-0bb5f10a5e4c", + "formId": "4b892695-350e-4b43-a9e0-821a7c60ebe8", + "version": 6, + "schema": { + "type": "form", + "display": "form", + "components": [ + { + "id": "ep715vh", + "key": "panel", + "tags": [], + "tree": false, + "type": "panel", + "input": false, + "label": "Panel", + "logic": [], + "theme": "default", + "title": "Panel", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "page": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "breadcrumb": "default", + "components": [ + { + "id": "e19iqzb", + "key": "panel1", + "tags": [], + "tree": false, + "type": "panel", + "input": false, + "label": "Panel", + "logic": [], + "theme": "default", + "title": "Panel", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "page": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "breadcrumb": "default", + "components": [ + { + "id": "eboiajz", + "key": "dataGrid", + "tags": [], + "tree": true, + "type": "datagrid", + "input": true, + "label": "Data Grid", + "logic": [], + "addons": [], + "errors": "", + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": null, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "page": "", + "style": "", + "width": "", + "height": "" + }, + "reorder": false, + "tooltip": "", + "disabled": false, + "lazyLoad": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "json": "", + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "maxLength": "", + "minLength": "", + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "initEmpty": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "addAnother": "", + "attributes": {}, + "components": [ + { + "id": "e6w5eal", + "key": "simpletextfield", + "case": "", + "mask": false, + "type": "simpletextfield", + "input": true, + "label": "Text Field", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "pattern": "", + "multiple": false, + "required": false, + "maxLength": "", + "minLength": "", + "isUseForCopy": false, + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "inputMask": "", + "inputType": "text", + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": true, + "properties": {}, + "spellcheck": true, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "displayMask": "", + "inputFormat": "plain", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false, + "truncateMultipleSpaces": false + }, + { + "id": "evjpl9", + "key": "simplenumber", + "type": "simplenumber", + "input": true, + "label": "Number", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "max": "", + "min": "", + "step": "any", + "custom": "", + "unique": false, + "integer": "", + "multiple": false, + "required": false, + "isUseForCopy": false, + "customMessage": "", + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "delimiter": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": true, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "requireDecimal": false, + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + } + ], + "errorLabel": "", + "persistent": true, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "layoutFixed": false, + "placeholder": "", + "defaultValue": [ + {} + ], + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "enableRowGroups": false, + "customConditional": "", + "addAnotherPosition": "bottom", + "allowMultipleMasks": false, + "customDefaultValue": "", + "conditionalAddButton": "", + "allowCalculateOverride": false, + "disableAddingRemovingRows": false + } + ], + "errorLabel": "", + "persistent": false, + "properties": {}, + "validateOn": "change", + "clearOnHide": false, + "collapsible": false, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + } + ], + "errorLabel": "", + "persistent": false, + "properties": {}, + "validateOn": "change", + "clearOnHide": false, + "collapsible": false, + "conditional": { + "eq": "", + "json": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": false, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "customConditional": "", + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + }, + { + "id": "efu80mx", + "key": "submit", + "size": "md", + "type": "button", + "block": false, + "input": true, + "label": "Submit", + "theme": "primary", + "action": "submit", + "addons": [], + "hidden": false, + "prefix": "", + "suffix": "", + "unique": false, + "widget": { + "type": "input" + }, + "dbIndex": false, + "overlay": { + "top": "", + "left": "", + "style": "", + "width": "", + "height": "" + }, + "tooltip": "", + "disabled": false, + "leftIcon": "", + "multiple": false, + "redrawOn": "", + "tabindex": "", + "validate": { + "custom": "", + "unique": false, + "multiple": false, + "required": false, + "customPrivate": false, + "strictDateValidation": false + }, + "autofocus": false, + "encrypted": false, + "hideLabel": false, + "modalEdit": false, + "protected": false, + "refreshOn": "", + "rightIcon": "", + "tableView": false, + "attributes": {}, + "errorLabel": "", + "persistent": false, + "properties": {}, + "validateOn": "change", + "clearOnHide": true, + "conditional": { + "eq": "", + "show": null, + "when": null + }, + "customClass": "", + "description": "", + "placeholder": "", + "defaultValue": null, + "dataGridLabel": true, + "labelPosition": "top", + "showCharCount": false, + "showWordCount": false, + "calculateValue": "", + "calculateServer": false, + "disableOnInvalid": true, + "allowMultipleMasks": false, + "customDefaultValue": "", + "allowCalculateOverride": false + } + ] + }, + "createdBy": "AGONCALV@idir", + "createdAt": "2024-11-20T20:57:30.876Z", + "updatedBy": null, + "updatedAt": "2024-11-20T20:57:30.872Z", + "published": true +} \ No newline at end of file diff --git a/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Unity.GrantManager.Domain.Tests.csproj b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Unity.GrantManager.Domain.Tests.csproj index 2f31088ac..ce30e8b83 100644 --- a/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Unity.GrantManager.Domain.Tests.csproj +++ b/applications/Unity.GrantManager/test/Unity.GrantManager.Domain.Tests/Unity.GrantManager.Domain.Tests.csproj @@ -30,6 +30,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest +