diff --git a/applications/Unity.AutoUI/cypress/e2e/chefsdata.cy.ts b/applications/Unity.AutoUI/cypress/e2e/chefsdata.cy.ts index 48432f83d..5f8bf0f6a 100644 --- a/applications/Unity.AutoUI/cypress/e2e/chefsdata.cy.ts +++ b/applications/Unity.AutoUI/cypress/e2e/chefsdata.cy.ts @@ -1,175 +1,187 @@ /// describe('Unity Login and check data from CHEFS', () => { - - it('Verify Login', () => { - cy.login() - }) - // 19.) Verify that the info panel populates with mapped data - it('Verify the UI is populated with valid data from CHEFS', () => { - - cy.getSubmissionDetail('confirmationID').then(id => {cy.log(`Confirmation ID: ${id}`);}); - - cy.get('#search').should('exist').clear(); // Ensure the field exists and clear its contents - cy.get('#search').click() // click the search field - cy.getSubmissionDetail('confirmationID').then(id => cy.get('#search').type(id)); // Fetch the confirmation ID and type it into the search field - cy.getSubmissionDetail('confirmationID').then(id => cy.contains('tr', id).find('.checkbox-select').click()); // Fetch the confirmation ID, find its row, and click the checkbox - - cy.get('#applicationLink').should('exist').click() // open the info panel + + it('Verify Login', () => { + cy.login() + }) // 19.) Verify that the info panel populates with mapped data - // Category: AutoUI - cy.get('label[for="Category"]').next('.display-input').should('include.text', 'AutoUI'); - // Organization Name: DOLPHIN ASPHALT - cy.get('label[for="OrganizationName"]').next('.display-input').should('include.text', 'DOLPHIN ASPHALT') - // Organization #: - cy.get('label[for="OrganizationNumber"]').next('.display-input').should('include.text', 'FM0162628') - // Economic Region: Kootenay - cy.get('label[for="EconomicRegion"]').next('.display-input').should('include.text', 'Kootenay') - // Regional District: East Kootenay - cy.get('label[for="RegionalDistrict"]').next('.display-input').should('include.text', 'East Kootenay') - // Community: East Kootenay B - cy.get('label[for="Community"]').next('.display-input').should('include.text', 'East Kootenay B') - // Requested Amount: $89,000.00 - cy.get('label[for="RequestedAmount"]').next('.display-input').should('include.text', '$89,000.00') - // Total Project Budget: $125,000.00 - cy.get('label[for="ProjectBudget"]').next('.display-input').should('include.text', '$125,000.00') - // Sector: Other services (except public administration) - cy.get('label[for="Sector"]').next('.display-input').should('include.text', 'Other services (except public administration)') - cy.get('#closeSummaryCanvas').click() - // 20.) Verify that the details panel populates with mapped data - cy.get('#externalLink').should('exist').click() //open the application - // Category: AutoUI - cy.get('label[for="Category"]').next('.display-input').should('include.text', 'AutoUI') - // Organization Name: DOLPHIN ASPHALT - cy.get('label[for="OrganizationName"]').next('.display-input').should('include.text', 'DOLPHIN ASPHALT') - // Organization #: - cy.get('label[for="OrganizationNumber"]').next('.display-input').should('include.text', 'FM0162628') - // Economic Region: Kootenay - cy.get('label[for="EconomicRegion"]').next('.display-input').should('include.text', 'Kootenay') - // Regional District: East Kootenay - cy.get('label[for="RegionalDistrict"]').next('.display-input').should('include.text', 'East Kootenay') - // Community: East Kootenay B - cy.get('label[for="Community"]').next('.display-input').should('include.text', 'East Kootenay B') - // Requested Amount: $89,000.00 - cy.get('label[for="RequestedAmount"]').next('.display-input').should('include.text', '$89,000.00') - // Total Project Budget: $125,000.00 - cy.get('label[for="ProjectBudget"]').next('.display-input').should('include.text', '$125,000.00') - // Sector: Other services (except public administration) - cy.get('label[for="Sector"]').next('.display-input').should('include.text', 'Other services (except public administration)') - // 21.) Verify that the Review & Assessment tab populates with mapped data - cy.get('#nav-review-and-assessment-tab').should('exist').click() // open the Review & Assessment tab - // Requested Amount: $89,000.00 - cy.get('#RequestedAmountInputAR').should('have.value', '89,000.00') - // Total Project Budget: $125,000.00 - cy.get('#TotalBudgetInputAR').should('have.value', '125,000.00') - // 22.) Verify that the Project Info tab populates with mapped data - cy.get('#nav-project-info-tab').should('exist').click() // open the Project Info tab - // Project Name - cy.get('#ProjectInfo_ProjectName').should('have.value', 'Hanbury Development Initiative - Phase 2') - // Project Start Date: 2026-01-05 - cy.get('#startDate').should('have.value', '2026-01-05') - // Project End Date: 2027-03-11 - cy.get('#ProjectInfo_ProjectEndDate').should('have.value', '2027-03-11') - // Requested Amount: $89,000.00 - cy.get('#RequestedAmountInputPI').should('have.value', '89,000.00') - // Total Project Budget: $125,000.00 - cy.get('#TotalBudgetInputPI').should('have.value', '125,000.00') - // Acquisition: No - cy.get('#ProjectInfo_Acquisition').should('have.value', 'NO') - // Forestry/Non-Forestry: Forestry - cy.get('#ProjectInfo_Forestry').should('have.value', 'FORESTRY') - // Forestry Focus: Secondary/Value-Added/Not Mass Timber (value="SECONDARY") - cy.get('#ProjectInfo_ForestryFocus').should('have.value', 'SECONDARY') - // Economic Region: Kootenay - cy.get('#economicRegions').should('have.value', 'Kootenay') - // Regional District: East Kootenay - cy.get('#regionalDistricts').should('have.value', 'East Kootenay') - // Community: East Kootenay B - cy.get('#communities').should('have.value', 'East Kootenay B') - // Community Population: 38 - cy.get('#ProjectInfo_CommunityPopulation').should('have.value', '38') - // Electoral District: Kootenay-Rockies - cy.get('#ProjectInfo_ElectoralDistrict').should('have.value', 'Kootenay-Rockies') - // Place: Hanbury - cy.get('#ProjectInfo_Place').should('have.value', 'Hanbury') - // 23.) Verify that the Applicant Info tab populates with mapped data - cy.get('#nav-organization-info-tab').should('exist').click() // open the Applicant Info tab - // Organization Name: DOLPHIN ASPHALT - cy.get('#ApplicantInfo_OrgName').should('have.value', 'DOLPHIN ASPHALT') - // Organization #: FM0162628 - cy.get('#ApplicantInfo_OrgNumber').should('have.value', 'FM0162628') - // Other Sector/Sub/Industry Description: Stone Aggregate Recycling - cy.get('#ApplicantInfo_SectorSubSectorIndustryDesc').should('have.value', 'Stone Aggregate Recycling') - // Full Name: Jeff Gordon - cy.get('#ApplicantInfo_ContactFullName').should('have.value', 'Jeff Gordon') - // Title: Sr. Analyst - cy.get('#ApplicantInfo_ContactTitle').should('have.value', 'Sr. Analyst') - // Email: Jeff.Gordon@Dolphin.ca - cy.get('#ApplicantInfo_ContactEmail').should('have.value', 'Jeff.Gordon@Dolphin.ca') - // Business Phone: (250) 621-3217 - cy.get('#ApplicantInfo_ContactBusinessPhone').should('have.value', '(250) 621-3217') - // Cell Phone: (887) 362-1459 - cy.get('#ApplicantInfo_ContactCellPhone').should('have.value', '(887) 362-1459') - // (Physical Address) - // Street: 24th Avenue South - cy.get('#ApplicantInfo_PhysicalAddressStreet').should('have.value', '24th Avenue South') - // Street 2: Room 409 - cy.get('#ApplicantInfo_PhysicalAddressStreet2').should('have.value', 'Room 409') - // Unit: 19 - cy.get('#ApplicantInfo_PhysicalAddressUnit').should('have.value', '19') - // City: Cranbrook - cy.get('#ApplicantInfo_PhysicalAddressCity').should('have.value', 'Cranbrook') - // Province: British Columbia - cy.get('#ApplicantInfo_PhysicalAddressProvince').should('have.value', 'British Columbia') - // Postal Code: V1C 3H8 - cy.get('#ApplicantInfo_PhysicalAddressPostalCode').should('have.value', 'V1C 3H8') - // (Mailing Address) - // Street: 2567 Shaughnessy Street - cy.get('#ApplicantInfo_MailingAddressStreet').should('have.value', '2567 Shaughnessy Street') - // Street 2: PO Box 905 - cy.get('#ApplicantInfo_MailingAddressStreet2').should('have.value', 'PO Box 905') - // Unit: 22 - cy.get('#ApplicantInfo_MailingAddressUnit').should('have.value', '22') - // City: Hanbury - cy.get('#ApplicantInfo_MailingAddressCity').should('have.value', 'Hanbury') - // Province: British Columbia - cy.get('#ApplicantInfo_MailingAddressProvince').should('have.value', 'British Columbia') - // Postal Code: V1C 4T6 - cy.get('#ApplicantInfo_MailingAddressPostalCode').should('have.value', 'V1C 4T6') - // (Signing Authority) - // Full Name: Maximillion Cooper - cy.get('#ApplicantInfo_SigningAuthorityFullName').should('have.value', 'Maximillion Cooper') - // Title: Consultant - cy.get('#ApplicantInfo_SigningAuthorityTitle').should('have.value', 'Consultant') - // Email: Maximillion.Cooper@Dolphin.ca - cy.get('#ApplicantInfo_SigningAuthorityEmail').should('have.value', 'Maximillion.Cooper@Dolphin.ca') - // Business Phone: (250) 841-2511 - cy.get('#ApplicantInfo_SigningAuthorityBusinessPhone').should('have.value', '(250) 841-2511') - // Phone: (657) 456-5413 - cy.get('#ApplicantInfo_SigningAuthorityCellPhone').should('have.value', '(657) 456-5413') - // 24.) Verify that the Sector and Subsector Select Lists have a valid list of values. - // Check if the sector dropdown contains an option for "Manufacturing" - cy.get('#orgSectorDropdown').should('contain', 'Manufacturing') - // Select manufacturing - cy.get('#orgSectorDropdown').select('Manufacturing') - // Array of all expected options to check for in the Subsector list of values. - const options = ['Apparel manufacturing', 'Beverage and tobacco product manufacturing', 'Chemical manufacturing', 'Computer and electronic product manufacturing', 'Electrical equipment, appliance, and component manufacturing', 'Fabricated metal product manufacturing', 'Food manufacturing', 'Furniture and related product manufacturing', 'Leather and allied product manufacturing', 'Machinery manufacturing', 'Miscellaneous manufacturing', 'Non-metallic mineral product manufacturing', 'Other', 'Paper manufacturing', 'Petroleum and coal product manufacturing', 'Plastics and rubber products manufacturing', 'Primary metal manufacturing', 'Printing and related support activities', 'Textile mills', 'Textile product mills', 'Transportation equipment manufacturing', 'Wood product manufacturing'] - // Check if the dropdown contains each expected option in the options array - options.forEach(option => {cy.get('#orgSubSectorDropdown').select(option).should('have.value', option) - }) - // 25 Verify that the Payment Info tab populates with mapped data - cy.get('#nav-payment-info-tab').should('exist').click() // open the Payment Info tab - // Requested Amount: 89,000.00 - cy.get('#RequestedAmount').should('have.value', '89,000.00') - // 26.) Verify that the Submission tab populates with all form data - cy.get('#nav-summery-tab').should('exist').click() // open the Submission tab - const headers = ['1. INTRODUCTION', '2. ELIGIBILITY', '3. APPLICANT INFORMATION','4. PROJECT INFORMATION', '5. PROJECT TIMELINES', '6. PROJECT BUDGET', '7. ATTESTATION']; - headers.forEach(header => { - cy.contains('h4', header) - .should('exist') - .click(); - }); - }) - it('Verify Logout', () => { - cy.logout() - }) + it('Verify the UI is populated with valid data from CHEFS', () => { + + cy.getSubmissionDetail('confirmationID').then(id => { cy.log(`Confirmation ID: ${id}`); }); + + cy.get('#search').should('exist').clear(); // Ensure the field exists and clear its contents + cy.get('#search').click() // click the search field + cy.getSubmissionDetail('confirmationID').then(id => cy.get('#search').type(id)); // Fetch the confirmation ID and type it into the search field + cy.getSubmissionDetail('confirmationID').then(id => cy.contains('tr', id).find('.checkbox-select').click()); // Fetch the confirmation ID, find its row, and click the checkbox + + cy.get('#applicationLink').should('exist').click() // open the info panel + // 19.) Verify that the info panel populates with mapped data + // Category: AutoUI + cy.get('label[for="Category"]').next('.display-input').should('include.text', 'AutoUI'); + // Organization Name: DOLPHIN ASPHALT + cy.get('label.display-input-label[for="OrganizationName"]').next('div.display-input').should('contain.text', 'DOLPHIN ASPHALT') + // Organization #: + cy.get('label.display-input-label[for="OrganizationNumber"]').next('div.display-input').should('contain.text', 'FM0162628') + // Economic Region: Kootenay + cy.get('label[for="EconomicRegion"]').next('.display-input').should('include.text', 'Kootenay') + // Regional District: East Kootenay + cy.get('label[for="RegionalDistrict"]').next('.display-input').should('include.text', 'East Kootenay') + // Community: East Kootenay B + cy.get('label[for="Community"]').next('.display-input').should('include.text', 'East Kootenay B') + // Requested Amount: $89,000.00 + cy.get('label[for="RequestedAmount"]').next('.display-input').should('include.text', '$89,000.00') + // Total Project Budget: $125,000.00 + cy.get('label[for="ProjectBudget"]').next('.display-input').should('include.text', '$125,000.00') + // Sector: Other services (except public administration) + cy.get('label[for="Sector"]').next('.display-input').should('include.text', 'Other services (except public administration)') + cy.get('#closeSummaryCanvas').click() + // 20.) Verify that the details panel populates with mapped data + cy.get('#externalLink').should('exist').click() //open the application + // Category: AutoUI + cy.get('label[for="Category"]').next('.display-input').should('include.text', 'AutoUI') + // Organization Name: DOLPHIN ASPHALT + cy.get('label[for="OrganizationName"]').next('.display-input').should('include.text', 'DOLPHIN ASPHALT') + // Organization #: + cy.get('label[for="OrganizationNumber"]').next('.display-input').should('include.text', 'FM0162628') + // Economic Region: Kootenay + cy.get('label[for="EconomicRegion"]').next('.display-input').should('include.text', 'Kootenay') + // Regional District: East Kootenay + cy.get('label[for="RegionalDistrict"]').next('.display-input').should('include.text', 'East Kootenay') + // Community: East Kootenay B + cy.get('label[for="Community"]').next('.display-input').should('include.text', 'East Kootenay B') + // Requested Amount: $89,000.00 + cy.get('label[for="RequestedAmount"]').next('.display-input').should('include.text', '$89,000.00') + // Total Project Budget: $125,000.00 + cy.get('label[for="ProjectBudget"]').next('.display-input').should('include.text', '$125,000.00') + // Sector: Other services (except public administration) + cy.get('label[for="Sector"]').next('.display-input').should('include.text', 'Other services (except public administration)') + // 21.) Verify that the Review & Assessment tab populates with mapped data + cy.get('#nav-review-and-assessment-tab').should('exist').click() // open the Review & Assessment tab + // Requested Amount: $89,000.00 + cy.get('#RequestedAmountInputAR').should('have.value', '89,000.00') + // Total Project Budget: $125,000.00 + cy.get('#TotalBudgetInputAR').should('have.value', '125,000.00') + // 22.) Verify that the Project Info tab populates with mapped data + cy.get('#nav-project-info-tab').should('exist').click() // open the Project Info tab + // Project Name + cy.get('#ProjectInfo_ProjectName').should('have.value', 'Hanbury Development Initiative - Phase 2') + // Project Start Date: 2026-01-05 + cy.get('#startDate').should('have.value', '2026-01-05') + // Project End Date: 2027-03-11 + cy.get('#ProjectInfo_ProjectEndDate').should('have.value', '2027-03-11') + // Requested Amount: $89,000.00 + cy.get('#RequestedAmountInputPI').should('have.value', '89,000.00') + // Total Project Budget: $125,000.00 + cy.get('#TotalBudgetInputPI').should('have.value', '125,000.00') + // Acquisition: No + cy.get('#ProjectInfo_Acquisition').should('have.value', 'NO') + // Forestry/Non-Forestry: Forestry + cy.get('#ProjectInfo_Forestry').should('have.value', 'FORESTRY') + // Forestry Focus: Secondary/Value-Added/Not Mass Timber (value="SECONDARY") + cy.get('#ProjectInfo_ForestryFocus').should('have.value', 'SECONDARY') + // Economic Region: Kootenay + cy.get('#economicRegions').should('have.value', 'Kootenay') + // Regional District: East Kootenay + cy.get('#regionalDistricts').should('have.value', 'East Kootenay') + // Community: East Kootenay B + cy.get('#communities').should('have.value', 'East Kootenay B') + // Community Population: 38 + cy.get('#ProjectInfo_CommunityPopulation').should('have.value', '38') + // Electoral District: Kootenay-Rockies + cy.get('#ProjectInfo_ElectoralDistrict').should('have.value', 'Kootenay-Rockies') + // Place: Hanbury + cy.get('#ProjectInfo_Place').should('have.value', 'Hanbury') + + // 23.) open the Applicant Info tab + it('23. Applicant Info tab shows the mapped data', () => { + // 1. open the pane + cy.contains('a.nav-link', 'Applicant Info').click() + + // 2. wait for the Applicant Info fieldset, then work inside it + cy.get('fieldset[name$="Applicant_Summary"]', { timeout: 10_000 }) + .should('be.visible') + .as('app') // alias for scoping + + // 3. simple value assertions + const plainInputs: [string, string][] = [ + ['#ApplicantSummary_OrgName', 'DOLPHIN ASPHALT'], + ['#ApplicantSummary_OrgNumber', 'FM0162628'], + ['#ApplicantSummary_ContactFullName', 'Jeff Gordon'], + ['#ApplicantSummary_ContactTitle', 'Sr. Analyst'], + ['#ApplicantSummary_ContactEmail', 'Jeff.Gordon@Dolphin.ca'], + ['#ApplicantSummary_ContactBusinessPhone', '(250) 621-3217'], + ['#ApplicantSummary_ContactCellPhone', '(887) 362-1459'], + ['#ApplicantSummary_PhysicalAddressStreet', '24th Avenue South'], + ['#ApplicantSummary_PhysicalAddressStreet2', 'Room 409'], + ['#ApplicantSummary_PhysicalAddressUnit', '19'], + ['#ApplicantSummary_PhysicalAddressCity', 'Cranbrook'], + ['#ApplicantSummary_PhysicalAddressProvince', 'British Columbia'], + ['#ApplicantSummary_PhysicalAddressPostalCode', 'V1C 3H8'], + ['#ApplicantInfo_MailingAddressStreet', '2567 Shaughnessy Street'], + ['#ApplicantInfo_MailingAddressStreet2', 'PO Box 905'], + ['#ApplicantInfo_MailingAddressUnit', '22'], + ['#ApplicantInfo_MailingAddressCity', 'Hanbury'], + ['#ApplicantInfo_MailingAddressProvince', 'British Columbia'], + ['#ApplicantInfo_MailingAddressPostalCode', 'V1C 4T6'], + ['#ApplicantInfo_SigningAuthorityFullName', 'Maximillion Cooper'], + ['#ApplicantInfo_SigningAuthorityTitle', 'Consultant'], + ['#ApplicantInfo_SigningAuthorityEmail', 'Maximillion.Cooper@Dolphin.ca'], + ['#ApplicantInfo_SigningAuthorityBusinessPhone', '(250) 841-2511'], + ['#ApplicantInfo_SigningAuthorityCellPhone', '(657) 456-5413'] + ] + + plainInputs.forEach(([selector, expected]) => { + cy.get('@app').find(selector).should('have.value', expected) + }) + + // 4. textarea requires .invoke('val') + cy.get('@app') + .find('#ApplicantSummary_SectorSubSectorIndustryDesc') + .invoke('val') + .should('equal', 'Stone Aggregate Recycling') + }) + + // 24.) Sector and Sub-sector lists + it('24. Sector and Sub-sector dropdowns behave', () => { + // open Applicant Info + cy.contains('a.nav-link', 'Applicant Info').click() + + // locate the Sector and Sub-sector `; }, - index: 0, + }; } @@ -511,26 +537,6 @@ function toggleFilterRow() { $(this).popover('toggle'); $('#dtFilterRow').toggleClass('hidden'); } -function updateColvisButtonState($btn, api, colIndex) { - const visible = api.column(colIndex).visible(); - $btn.toggleClass('dt-button-active', visible); -} - -function syncColvisButtonStates(api) { - const aoColumns = api.settings()[0].aoColumns; - - let x = $('.dt-button-collection .dt-button'); - let z = $('.dt-button-collection a.dt-button'); - $('.dt-button-collection a.dt-button').each(function () { - const $btn = $(this); - const colName = $btn.attr('data-cv-name'); - - const colIndex = aoColumns.findIndex((col) => col.name === colName); - if (colIndex !== -1) { - updateColvisButtonState($btn, api, colIndex); - } - }); -} function findColumnByTitle(title, dataTable) { let columnIndex = dataTable diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Permissions/PermissionGrantsDataSeeder.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Permissions/PermissionGrantsDataSeeder.cs index d7af16c3f..856de9e42 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Permissions/PermissionGrantsDataSeeder.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Permissions/PermissionGrantsDataSeeder.cs @@ -81,6 +81,12 @@ public PermissionGrantsDataSeeder(IPermissionDataSeeder permissionDataSeeder) GrantApplicationPermissions.Dashboard.RequestApprovedCount, ]; + public readonly List SettingManagement_Tags_CommonPermissions = [ + UnitySelector.SettingManagement.Tags.Default, + UnitySelector.SettingManagement.Tags.Update, + UnitySelector.SettingManagement.Tags.Delete + ]; + public async Task SeedAsync(DataSeedContext context) { // Default permission grants based on role @@ -109,6 +115,7 @@ await _permissionDataSeeder.SeedAsync(RolePermissionValueProvider.ProviderName, GrantManagerPermissions.Intakes.Default, GrantManagerPermissions.ApplicationForms.Default, + .. SettingManagement_Tags_CommonPermissions, .. ReviewAndAssessment_CommonPermissions, .. ApplicantInfo_CommonPermissions, .. ProjectInfo_CommonPermissions, @@ -162,10 +169,8 @@ await _permissionDataSeeder.SeedAsync(RolePermissionValueProvider.ProviderName, GrantManagerPermissions.Organizations.ManageProfiles, GrantApplicationPermissions.Approvals.BulkApplicationApproval, GrantApplicationPermissions.Approvals.DeferAfterApproval, - UnitySelector.SettingManagement.Tags.Default, - UnitySelector.SettingManagement.Tags.Update, - UnitySelector.SettingManagement.Tags.Delete, + .. SettingManagement_Tags_CommonPermissions, .. ReviewAndAssessment_CommonPermissions, .. ApplicantInfo_CommonPermissions, .. ProjectInfo_CommonPermissions, @@ -204,6 +209,7 @@ await _permissionDataSeeder.SeedAsync(RolePermissionValueProvider.ProviderName, GrantManagerPermissions.ApplicationForms.Default, + .. SettingManagement_Tags_CommonPermissions, .. ReviewAndAssessment_CommonPermissions, .. ApplicantInfo_CommonPermissions, .. ProjectInfo_CommonPermissions, @@ -212,9 +218,6 @@ await _permissionDataSeeder.SeedAsync(RolePermissionValueProvider.ProviderName, .. Dashboard_CommonPermissions, UnitySettingManagementPermissions.BackgroundJobSettings, - UnitySelector.SettingManagement.Tags.Default, - UnitySelector.SettingManagement.Tags.Update, - UnitySelector.SettingManagement.Tags.Delete ], context.TenantId); diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js index 22f32ed23..d4a123a92 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js @@ -200,87 +200,88 @@ } function getColumns() { + let columnIndex = 1; const sortedColumns = [ getSelectColumn('Select Application', 'rowCount', 'applications'), - getApplicantNameColumn(), - getApplicationNumberColumn(), - getCategoryColumn(), - getSubmissionDateColumn(), - getProjectNameColumn(), - getSectorColumn(), - getSubSectorColumn(), - getTotalProjectBudgetColumn(), - getAssigneesColumn(), - getStatusColumn(), - getRequestedAmountColumn(), - getApprovedAmountColumn(), - getEconomicRegionColumn(), - getRegionalDistrictColumn(), - getCommunityColumn(), - getOrganizationNumberColumn(), - getOrgBookStatusColumn(), - getProjectStartDateColumn(), - getProjectEndDateColumn(), - getProjectedFundingTotalColumn(), - getTotalProjectBudgetPercentageColumn(), - getTotalPaidAmountColumn(), - getElectoralDistrictColumn(), - getApplicantElectoralDistrictColumn(), - getForestryOrNonForestryColumn(), - getForestryFocusColumn(), - getAcquisitionColumn(), - getCityColumn(), - getCommunityPopulationColumn(), - getLikelihoodOfFundingColumn(), - getSubStatusColumn(), - getTagsColumn(), - getTotalScoreColumn(), - getAssessmentResultColumn(), - getRecommendedAmountColumn(), - getDueDateColumn(), - getOwnerColumn(), - getDecisionDateColumn(), - getProjectSummaryColumn(), - getOrganizationTypeColumn(), - getOrganizationNameColumn(), - getDueDiligenceStatusColumn(), - getDeclineRationaleColumn(), - getContactFullNameColumn(), - getContactTitleColumn(), - getContactEmailColumn(), - getContactBusinessPhoneColumn(), - getContactCellPhoneColumn(), - getSectorSubSectorIndustryDescColumn(), - getSigningAuthorityFullNameColumn(), - getSigningAuthorityTitleColumn(), - getSigningAuthorityEmailColumn(), - getSigningAuthorityBusinessPhoneColumn(), - getSigningAuthorityCellPhoneColumn(), - getPlaceColumn(), - getRiskRankingColumn(), - getNotesColumn(), - getRedStopColumn(), - getIndigenousColumn(), - getFyeDayColumn(), - getFyeMonthColumn(), - getApplicantIdColumn(), - getPayoutColumn() + getApplicantNameColumn(columnIndex++), + getApplicationNumberColumn(columnIndex++), + getCategoryColumn(columnIndex++), + getSubmissionDateColumn(columnIndex++), + getProjectNameColumn(columnIndex++), + getSectorColumn(columnIndex++), + getSubSectorColumn(columnIndex++), + getTotalProjectBudgetColumn(columnIndex++), + getAssigneesColumn(columnIndex++), + getStatusColumn(columnIndex++), + getRequestedAmountColumn(columnIndex++), + getApprovedAmountColumn(columnIndex++), + getEconomicRegionColumn(columnIndex++), + getRegionalDistrictColumn(columnIndex++), + getCommunityColumn(columnIndex++), + getOrganizationNumberColumn(columnIndex++), + getOrgBookStatusColumn(columnIndex++), + getProjectStartDateColumn(columnIndex++), + getProjectEndDateColumn(columnIndex++), + getProjectedFundingTotalColumn(columnIndex++), + getTotalProjectBudgetPercentageColumn(columnIndex++), + getTotalPaidAmountColumn(columnIndex++), + getElectoralDistrictColumn(columnIndex++), + getApplicantElectoralDistrictColumn(columnIndex++), + getForestryOrNonForestryColumn(columnIndex++), + getForestryFocusColumn(columnIndex++), + getAcquisitionColumn(columnIndex++), + getCityColumn(columnIndex++), + getCommunityPopulationColumn(columnIndex++), + getLikelihoodOfFundingColumn(columnIndex++), + getSubStatusColumn(columnIndex++), + getTagsColumn(columnIndex++), + getTotalScoreColumn(columnIndex++), + getAssessmentResultColumn(columnIndex++), + getRecommendedAmountColumn(columnIndex++), + getDueDateColumn(columnIndex++), + getOwnerColumn(columnIndex++), + getDecisionDateColumn(columnIndex++), + getProjectSummaryColumn(columnIndex++), + getOrganizationTypeColumn(columnIndex++), + getOrganizationNameColumn(columnIndex++), + getDueDiligenceStatusColumn(columnIndex++), + getDeclineRationaleColumn(columnIndex++), + getContactFullNameColumn(columnIndex++), + getContactTitleColumn(columnIndex++), + getContactEmailColumn(columnIndex++), + getContactBusinessPhoneColumn(columnIndex++), + getContactCellPhoneColumn(columnIndex++), + getSectorSubSectorIndustryDescColumn(columnIndex++), + getSigningAuthorityFullNameColumn(columnIndex++), + getSigningAuthorityTitleColumn(columnIndex++), + getSigningAuthorityEmailColumn(columnIndex++), + getSigningAuthorityBusinessPhoneColumn(columnIndex++), + getSigningAuthorityCellPhoneColumn(columnIndex++), + getPlaceColumn(columnIndex++), + getRiskRankingColumn(columnIndex++), + getNotesColumn(columnIndex++), + getRedStopColumn(columnIndex++), + getIndigenousColumn(columnIndex++), + getFyeDayColumn(columnIndex++), + getFyeMonthColumn(columnIndex++), + getApplicantIdColumn(columnIndex++), + getPayoutColumn(columnIndex++) ].map((column) => ({ ...column, targets: [column.index], orderData: [column.index, 0] })) .sort((a, b) => a.index - b.index); return sortedColumns; } - function getApplicantNameColumn() { + function getApplicantNameColumn(columnIndex) { return { title: 'Applicant Name', data: 'applicant.applicantName', name: 'applicantName', className: 'data-table-header', - index: 1 + index: columnIndex } } - function getApplicationNumberColumn() { + function getApplicationNumberColumn(columnIndex) { return { title: 'Submission #', data: 'referenceNo', @@ -289,42 +290,42 @@ render: function (data, type, row) { return `${data}`; }, - index: 2 + index: columnIndex } } - function getCategoryColumn() { + function getCategoryColumn(columnIndex) { return { title: 'Category', data: 'category', name: 'category', className: 'data-table-header', - index: 3 + index: columnIndex } } - function getSubmissionDateColumn() { + function getSubmissionDateColumn(columnIndex) { return { title: l('SubmissionDate'), data: 'submissionDate', name: 'submissionDate', className: 'data-table-header', render: DataTable.render.date('YYYY-MM-DD', abp.localization.currentCulture.name), - index: 4 + index: columnIndex } } - function getProjectNameColumn() { + function getProjectNameColumn(columnIndex) { return { title: 'Project Name', data: 'projectName', name: 'projectName', className: 'data-table-header', - index: 5 + index: columnIndex } } - function getSectorColumn() { + function getSectorColumn(columnIndex) { return { title: 'Sector', name: 'sector', @@ -333,11 +334,11 @@ render: function (data) { return data ?? ''; }, - index: 6 + index: columnIndex } } - function getSubSectorColumn() { + function getSubSectorColumn(columnIndex) { return { title: 'SubSector', name: 'subsector', @@ -346,11 +347,11 @@ render: function (data) { return data ?? ''; }, - index: 7 + index: columnIndex } } - function getTotalProjectBudgetColumn() { + function getTotalProjectBudgetColumn(columnIndex) { return { title: 'Total Project Budget', name: 'totalProjectBudget', @@ -359,11 +360,11 @@ render: function (data) { return formatter.format(data); }, - index: 8 + index: columnIndex } } - function getAssigneesColumn() { + function getAssigneesColumn(columnIndex) { return { title: l('Assignee'), data: 'assignees', @@ -384,25 +385,21 @@ + getNames(data) + '">' + displayText + '' + ``; }, - index: 9 + index: columnIndex } } - function getDutyText(data) { - return data.duty ? (" [" + data.duty + "]") : ''; - } - - function getStatusColumn() { + function getStatusColumn(columnIndex) { return { title: l('GrantApplicationStatus'), data: 'status', name: 'status', className: 'data-table-header', - index: 10 + index: columnIndex } } - function getRequestedAmountColumn() { + function getRequestedAmountColumn(columnIndex) { return { title: l('RequestedAmount'), data: 'requestedAmount', @@ -411,11 +408,11 @@ render: function (data) { return formatter.format(data); }, - index: 11 + index: columnIndex } } - function getApprovedAmountColumn() { + function getApprovedAmountColumn(columnIndex) { return { title: 'Approved Amount', name: 'approvedAmount', @@ -424,11 +421,11 @@ render: function (data) { return formatter.format(data); }, - index: 12 + index: columnIndex } } - function getEconomicRegionColumn() { + function getEconomicRegionColumn(columnIndex) { return { title: 'Economic Region', name: 'economicRegion', @@ -437,11 +434,11 @@ render: function (data) { return data ?? ''; }, - index: 13 + index: columnIndex } } - function getRegionalDistrictColumn() { + function getRegionalDistrictColumn(columnIndex) { return { title: 'Regional District', name: 'regionalDistrict', @@ -450,11 +447,11 @@ render: function (data) { return data ?? ''; }, - index: 14 + index: columnIndex } } - function getCommunityColumn() { + function getCommunityColumn(columnIndex) { return { title: 'Community', name: 'community', @@ -463,11 +460,11 @@ render: function (data) { return data ?? ''; }, - index: 15 + index: columnIndex } } - function getOrganizationNumberColumn() { + function getOrganizationNumberColumn(columnIndex) { return { title: l('ApplicantInfoView:ApplicantInfo.OrgNumber'), name: 'orgNumber', @@ -477,11 +474,11 @@ render: function (data) { return data ?? ''; }, - index: 16 + index: columnIndex } } - function getOrgBookStatusColumn() { + function getOrgBookStatusColumn(columnIndex) { return { title: 'Org Book Status', name: 'orgBookStatus', @@ -496,11 +493,11 @@ return data ?? ''; } }, - index: 17 + index: columnIndex } } - function getProjectStartDateColumn() { + function getProjectStartDateColumn(columnIndex) { return { title: 'Project Start Date', name: 'projectStartDate', @@ -511,11 +508,11 @@ locale: abp.localization.currentCulture.name, }).toUTC().toLocaleString() : ''; }, - index: 18 + index: columnIndex } } - function getProjectEndDateColumn() { + function getProjectEndDateColumn(columnIndex) { return { title: 'Project End Date', name: 'projectEndDate', @@ -526,11 +523,11 @@ locale: abp.localization.currentCulture.name, }).toUTC().toLocaleString() : ''; }, - index: 19 + index: columnIndex } } - function getProjectedFundingTotalColumn() { + function getProjectedFundingTotalColumn(columnIndex) { return { title: 'Projected Funding Total', name: 'projectFundingTotal', @@ -539,11 +536,11 @@ render: function (data) { return formatter.format(data) ?? ''; }, - index: 20 + index: columnIndex } } - function getTotalProjectBudgetPercentageColumn() { + function getTotalProjectBudgetPercentageColumn(columnIndex) { return { title: '% of Total Project Budget', name: 'percentageTotalProjectBudget', @@ -552,11 +549,11 @@ render: function (data) { return data ?? ''; }, - index: 21 + index: columnIndex } } - function getTotalPaidAmountColumn() { + function getTotalPaidAmountColumn(columnIndex) { return { title: 'Total Paid Amount $', name: 'totalPaidAmount', @@ -565,11 +562,11 @@ render: function (data) { return ''; }, - index: 22 + index: columnIndex } } - function getElectoralDistrictColumn() { + function getElectoralDistrictColumn(columnIndex) { return { title: 'Project Electoral District', name: 'electoralDistrict', @@ -578,11 +575,24 @@ render: function (data) { return data ?? ''; }, - index: 23 + index: columnIndex } } - function getForestryOrNonForestryColumn() { + function getApplicantElectoralDistrictColumn(columnIndex) { + return { + title: 'Applicant Electoral District', + name: 'applicantElectoralDistrict', + data: 'applicant.electoralDistrict', + className: 'data-table-header', + render: function (data) { + return data ?? ''; + }, + index: columnIndex + } + } + + function getForestryOrNonForestryColumn(columnIndex) { return { title: 'Forestry or Non-Forestry', name: 'forestryOrNonForestry', @@ -594,11 +604,11 @@ else return ''; }, - index: 24 + index: columnIndex } } - function getForestryFocusColumn() { + function getForestryFocusColumn(columnIndex) { return { title: 'Forestry Focus', name: 'forestryFocus', @@ -625,11 +635,11 @@ } }, - index: 25 + index: columnIndex } } - function getAcquisitionColumn() { + function getAcquisitionColumn(columnIndex) { return { title: 'Acquisition', name: 'acquisition', @@ -645,11 +655,11 @@ } }, - index: 26 + index: columnIndex } } - function getCityColumn() { + function getCityColumn(columnIndex) { return { title: 'City', name: 'city', @@ -659,11 +669,11 @@ return data ?? ''; }, - index: 27 + index: columnIndex } } - function getCommunityPopulationColumn() { + function getCommunityPopulationColumn(columnIndex) { return { title: 'Community Population', name: 'communityPopulation', @@ -672,11 +682,11 @@ render: function (data) { return data ?? ''; }, - index: 28 + index: columnIndex } } - function getLikelihoodOfFundingColumn() { + function getLikelihoodOfFundingColumn(columnIndex) { return { title: 'Likelihood of Funding', name: 'likelihoodOfFunding', @@ -690,11 +700,11 @@ return ''; } }, - index: 29 + index: columnIndex } } - function getSubStatusColumn() { + function getSubStatusColumn(columnIndex) { return { title: 'Sub-Status', name: 'subStatusDisplayValue', @@ -703,11 +713,11 @@ render: function (data) { return data ?? ''; }, - index: 30 + index: columnIndex } } - function getTagsColumn() { + function getTagsColumn(columnIndex) { return { title: 'Tags', name: 'applicationTag', @@ -716,11 +726,11 @@ render: function (data) { return data.replace(/,/g, ', ') ?? ''; }, - index: 31 + index: columnIndex } } - function getTotalScoreColumn() { + function getTotalScoreColumn(columnIndex) { return { title: 'Total Score', name: 'totalScore', @@ -729,11 +739,11 @@ render: function (data) { return data ?? ''; }, - index: 32 + index: columnIndex } } - function getAssessmentResultColumn() { + function getAssessmentResultColumn(columnIndex) { return { title: 'Assessment Result', name: 'assessmentResult', @@ -747,11 +757,11 @@ return ''; } }, - index: 33 + index: columnIndex } } - function getRecommendedAmountColumn() { + function getRecommendedAmountColumn(columnIndex) { return { title: 'Recommended Amount', name: 'recommendedAmount', @@ -760,11 +770,11 @@ render: function (data) { return formatter.format(data) ?? ''; }, - index: 34 + index: columnIndex } } - function getDueDateColumn() { + function getDueDateColumn(columnIndex) { return { title: 'Due Date', name: 'dueDate', @@ -775,11 +785,11 @@ locale: abp.localization.currentCulture.name, }).toUTC().toLocaleString() : ''; }, - index: 35 + index: columnIndex } } - function getOwnerColumn() { + function getOwnerColumn(columnIndex) { return { title: 'Owner', name: 'Owner', @@ -788,11 +798,11 @@ render: function (data) { return data != null ? data.fullName : ''; }, - index: 36 + index: columnIndex } } - function getDecisionDateColumn() { + function getDecisionDateColumn(columnIndex) { return { title: 'Decision Date', name: 'finalDecisionDate', @@ -803,11 +813,11 @@ locale: abp.localization.currentCulture.name, }).toUTC().toLocaleString() : ''; }, - index: 37 + index: columnIndex } } - function getProjectSummaryColumn() { + function getProjectSummaryColumn(columnIndex) { return { title: 'Project Summary', name: 'projectSummary', @@ -816,11 +826,11 @@ render: function (data) { return data ?? ''; }, - index: 38 + index: columnIndex } } - function getOrganizationTypeColumn() { + function getOrganizationTypeColumn(columnIndex) { return { title: 'Organization Type', name: 'organizationType', @@ -829,11 +839,11 @@ render: function (data) { return getFullType(data) ?? ''; }, - index: 39 + index: columnIndex } } - function getOrganizationNameColumn() { + function getOrganizationNameColumn(columnIndex) { return { title: l('Summary:Application.OrganizationName'), name: 'organizationName', @@ -842,10 +852,10 @@ render: function (data) { return data ?? ''; }, - index: 40 + index: columnIndex } } - function getDueDiligenceStatusColumn() { + function getDueDiligenceStatusColumn(columnIndex) { return { title: 'Due Diligence Status', name: 'dueDiligenceStatus', @@ -854,11 +864,11 @@ render: function (data) { return titleCase(data ?? '') ?? ''; }, - index: 41 + index: columnIndex } } - function getDeclineRationaleColumn() { + function getDeclineRationaleColumn(columnIndex) { return { title: 'Decline Rationale', name: 'declineRationale', @@ -867,11 +877,11 @@ render: function (data) { return data ?? ''; }, - index: 42 + index: columnIndex } } - function getContactFullNameColumn() { + function getContactFullNameColumn(columnIndex) { return { title: 'Contact Full Name', name: 'contactFullName', @@ -880,10 +890,10 @@ render: function (data) { return data ?? ''; }, - index: 43 + index: columnIndex } } - function getContactTitleColumn() { + function getContactTitleColumn(columnIndex) { return { title: 'Contact Title', name: 'contactTitle', @@ -892,10 +902,10 @@ render: function (data) { return data ?? ''; }, - index: 44 + index: columnIndex } } - function getContactEmailColumn() { + function getContactEmailColumn(columnIndex) { return { title: 'Contact Email', name: 'contactEmail', @@ -904,10 +914,10 @@ render: function (data) { return data ?? ''; }, - index: 45 + index: columnIndex } } - function getContactBusinessPhoneColumn() { + function getContactBusinessPhoneColumn(columnIndex) { return { title: 'Contact Business Phone', name: 'contactBusinessPhone', @@ -916,10 +926,10 @@ render: function (data) { return data ?? ''; }, - index: 46 + index: columnIndex } } - function getContactCellPhoneColumn() { + function getContactCellPhoneColumn(columnIndex) { return { title: 'Contact Cell Phone', name: 'contactCellPhone', @@ -928,11 +938,11 @@ render: function (data) { return data ?? ''; }, - index: 47 + index: columnIndex } } - function getSectorSubSectorIndustryDescColumn() { + function getSectorSubSectorIndustryDescColumn(columnIndex) { return { title: 'Other Sector/Sub/Industry Description', name: 'sectorSubSectorIndustryDesc', @@ -941,11 +951,11 @@ render: function (data) { return data ?? ''; }, - index: 48 + index: columnIndex } } - function getSigningAuthorityFullNameColumn() { + function getSigningAuthorityFullNameColumn(columnIndex) { return { title: 'Signing Authority Full Name', name: 'signingAuthorityFullName', @@ -954,10 +964,10 @@ render: function (data) { return data ?? ''; }, - index: 49 + index: columnIndex } } - function getSigningAuthorityTitleColumn() { + function getSigningAuthorityTitleColumn(columnIndex) { return { title: 'Signing Authority Title', name: 'signingAuthorityTitle', @@ -966,10 +976,10 @@ render: function (data) { return data ?? ''; }, - index: 50 + index: columnIndex } } - function getSigningAuthorityEmailColumn() { + function getSigningAuthorityEmailColumn(columnIndex) { return { title: 'Signing Authority Email', name: 'signingAuthorityEmail', @@ -978,10 +988,10 @@ render: function (data) { return data ?? ''; }, - index: 51 + index: columnIndex } } - function getSigningAuthorityBusinessPhoneColumn() { + function getSigningAuthorityBusinessPhoneColumn(columnIndex) { return { title: 'Signing Authority Business Phone', name: 'signingAuthorityBusinessPhone', @@ -990,10 +1000,10 @@ render: function (data) { return data ?? ''; }, - index: 52 + index: columnIndex } } - function getSigningAuthorityCellPhoneColumn() { + function getSigningAuthorityCellPhoneColumn(columnIndex) { return { title: 'Signing Authority Cell Phone', name: 'signingAuthorityCellPhone', @@ -1002,10 +1012,10 @@ render: function (data) { return data ?? ''; }, - index: 53 + index: columnIndex } } - function getPlaceColumn() { + function getPlaceColumn(columnIndex) { return { title: 'Place', name: 'place', @@ -1014,11 +1024,11 @@ render: function (data) { return data ?? ''; }, - index: 54 + index: columnIndex } } - function getRiskRankingColumn() { + function getRiskRankingColumn(columnIndex) { return { title: 'Risk Ranking', name: 'riskranking', @@ -1027,11 +1037,11 @@ render: function (data) { return titleCase(data ?? '') ?? ''; }, - index: 55 + index: columnIndex } } - function getNotesColumn() { + function getNotesColumn(columnIndex) { return { title: 'Notes', name: 'notes', @@ -1044,11 +1054,11 @@ render: function (data) { return data ?? ''; }, - index: 56 + index: columnIndex } } - function getRedStopColumn() { + function getRedStopColumn(columnIndex) { return { title: 'Red-Stop', name: 'redstop', @@ -1057,11 +1067,11 @@ render: function (data) { return convertToYesNo(data); }, - index: 57 + index: columnIndex } } - function getIndigenousColumn() { + function getIndigenousColumn(columnIndex) { return { title: 'Indigenous', name: 'indigenous', @@ -1070,11 +1080,11 @@ render: function (data) { return data ?? ''; }, - index: 58 + index: columnIndex } } - function getFyeDayColumn() { + function getFyeDayColumn(columnIndex) { return { title: 'FYE Day', name: 'fyeDay', @@ -1083,11 +1093,11 @@ render: function (data) { return data ?? ''; }, - index: 59 + index: columnIndex } } - function getFyeMonthColumn() { + function getFyeMonthColumn(columnIndex) { return { title: 'FYE Month', name: 'fyeMonth', @@ -1101,11 +1111,11 @@ return ''; } }, - index: 60 + index: columnIndex } } - function getApplicantIdColumn() { + function getApplicantIdColumn(columnIndex) { return { title: 'Applicant Id', name: 'applicantId', @@ -1114,11 +1124,11 @@ render: function (data) { return data ?? ''; }, - index: 61 + index: columnIndex } } - function getPayoutColumn() { + function getPayoutColumn(columnIndex) { return { title: 'Payout', name: 'paymentInfo', @@ -1127,21 +1137,11 @@ render: function (data) { return payoutDefinition(data?.approvedAmount ?? 0, data?.totalPaid ?? 0); }, - index: 62 + index: columnIndex } } - - function getApplicantElectoralDistrictColumn() { - return { - title: 'Applicant Electoral District', - name: 'applicantElectoralDistrict', - data: 'applicant.electoralDistrict', - className: 'data-table-header', - render: function (data) { - return data ?? ''; - }, - index: 63 - } + function getDutyText(data) { + return data.duty ? (" [" + data.duty + "]") : ''; } function getFullType(code) { diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.cshtml index 87cee84c9..07e3db7c2 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.cshtml @@ -61,18 +61,33 @@ - + + + + + + + + + + + diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.js b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.js index d581ba82d..cdecde9a0 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.js +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantInfo/Default.js @@ -371,6 +371,19 @@ $(function () { }); }); +$(document).on('click', '#btnClearOrgbook', function (e) { + e.preventDefault(); + const $f = $('#ApplicantInfoForm'); + + if ($f.find('#ApplicantSummary_OrgName').val()) $('#saveApplicantInfoBtn').prop('disabled', false); + + $f.find('#ApplicantSummary_OrgName').val('').trigger('change'); + $f.find('#ApplicantSummary_OrgNumber').val('').trigger('change'); + $f.find('#ApplicantSummary_OrgStatus').val('').trigger('change'); + $f.find('#ApplicantSummary_OrganizationType').val('').trigger('change'); + + $('#orgBookSelect').val(null).trigger('change'); +}); // Move to zone-extensions function unflattenObject(flatObj) {