Skip to content
Merged

Dev #2349

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
797a9f3
feature/AB#32632-Worksheets
JamesPasta Apr 14, 2026
48fc2a8
feature/AB#32632-Worksheets dont allow edit on archived
JamesPasta Apr 14, 2026
1420ca4
feature/AB#32632-Worksheets sonar and placeholder
JamesPasta Apr 14, 2026
08f4b50
feature/AB#32632-Worksheets don't allow drag for archived
JamesPasta Apr 15, 2026
243665d
feature/AB#32632-Worksheets add placeholder move buttons
JamesPasta Apr 15, 2026
afa5b82
feature/AB#32632-Worksheets add delete to the unarchive
JamesPasta Apr 15, 2026
a2c3c7c
feature/AB#32632-Worksheets hooked into sonar cloud
JamesPasta Apr 15, 2026
583d2fe
feature/AB#32632-Worksheets hooked into sonar cloud
JamesPasta Apr 15, 2026
b3d2498
feature/AB#32632-Worksheets show message for no worksheets
JamesPasta Apr 15, 2026
7bb50ce
feature/AB#32632-Worksheets hooked into sonar cloud
JamesPasta Apr 16, 2026
326d078
feature/AB#32634-Enhance email scheduling
JamesPasta Apr 17, 2026
54fbf1c
AB#32654 Tenant install extension EntityFrameworkCore.Migrations
DarylTodosichuk Apr 23, 2026
adce6bf
Merge pull request #2341 from bcgov/feature/AB#32654-install-FuzzyMat…
DarylTodosichuk Apr 23, 2026
38473cb
AB#32770: Move Default SiteId from Applicants to Applications - Initi…
aurelio-aot Apr 24, 2026
83bdbbc
AB#32770: Include L3Pending When Getting Pending Payments
aurelio-aot Apr 24, 2026
968492b
AB#32770: Update Unit Test for L3 Pending Payments
aurelio-aot Apr 24, 2026
bdc901a
Merge branch 'feature/AB#32632-WorksheetMergeDev' into feature/AB#326…
JamesPasta Apr 24, 2026
c5cd893
Merge pull request #2343 from bcgov/feature/AB#32632-Worksheets
JamesPasta Apr 24, 2026
fa4985e
AB#32770: Prevent Applicant-Supplier Relationships Confusion By Remov…
aurelio-aot Apr 25, 2026
895f8e6
[AB#32699] Enable ordering for portal status table
plavoie-BC Apr 27, 2026
6c9bd32
[AB#31755] Remove jspdf dependency and related scripts
plavoie-BC Apr 27, 2026
d089704
Merge pull request #2344 from bcgov/bugfix/AB#32699-applicant-portal-…
JamesPasta Apr 27, 2026
dc4f4e8
Merge pull request #2342 from bcgov/feature/AB#32770-Move-DefaultSite…
JamesPasta Apr 27, 2026
26b35bf
[AB#31755] Update npm dependencies
plavoie-BC Apr 27, 2026
815dfef
[AB#31755] Update formiojs and choices.js dependencies
plavoie-BC Apr 27, 2026
0be4479
[AB#31755] Remove html2canvas dependency and scripts
plavoie-BC Apr 27, 2026
4b69f12
[AB#31755] Remove html2canvas from yarn lockfile
plavoie-BC Apr 27, 2026
cff8943
Merge remote-tracking branch 'origin/dev' into feature/AB#31755-npm-u…
plavoie-BC Apr 27, 2026
d54f053
feature/AB#32632-WorksheetMerge
JamesPasta Apr 27, 2026
7eb689e
feature/AB#32632-WorksheetMerge-Duplicates
JamesPasta Apr 27, 2026
2583945
feature/AB#32632-WorksheetMerge-CoPilotSuggestions
JamesPasta Apr 27, 2026
ba8691a
Merge pull request #2345 from bcgov/feature/AB#32632-WorksheetMergeDev
JamesPasta Apr 27, 2026
fa34ade
Merge pull request #2347 from bcgov/feature/AB#31755-npm-updates-jspd…
JamesPasta Apr 27, 2026
d128c42
feature/AB#32632-WorksheetMerge-CoPilotSuggestions
JamesPasta Apr 27, 2026
f8c3c14
Merge pull request #2348 from bcgov/feature/AB#32632-WorksheetMergeDev
JamesPasta Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ namespace Unity.Flex.Worksheets
public class EditSectionDto
{
public string Name { get; set; } = string.Empty;
public int? FieldWidth { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public interface IWorksheetAppService : IApplicationService
Task<WorksheetDto> EditAsync(Guid id, EditWorksheetDto dto);
Task<WorksheetDto> CloneAsync(Guid id);
Task<bool> PublishAsync(Guid id);
Task<bool> ArchiveAsync(Guid id, bool archive);
Task DeleteAsync(Guid id);
Task<WorksheetLinkedFormsDto> GetLinkedFormsAsync(Guid worksheetId);
Task ResequenceSectionsAsync(Guid id, uint oldIndex, uint newIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ public class WorksheetDto : ExtensibleFullAuditedEntityDto<Guid>
public uint TotalSections { get; set; } = 0;
public uint Version { get; set; } = 0;
public bool Published { get; set; } = false;
public bool IsArchived { get; set; } = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public class WorksheetSectionDto : EntityDto<Guid>
{
public string Name { get; set; } = string.Empty;
public uint Order { get; set; }
public int? FieldWidth { get; set; }
public string? Definition { get; set; }
public List<CustomFieldDto> Fields { get; set; } = [];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Worksheet : FullAuditedAggregateRoot<Guid>, IMultiTenant, IReportab
public virtual string Title { get; private set; } = string.Empty;
public virtual uint Version { get; private set; } = 1;
public virtual bool Published { get; private set; } = false;
public virtual bool IsArchived { get; private set; } = false;

public Guid? TenantId { get; set; }

Expand Down Expand Up @@ -61,9 +62,10 @@ internal Worksheet CloneSection(WorksheetSection clonedSection)
return this;
}

public Worksheet UpdateSection(WorksheetSection section, string name)
public Worksheet UpdateSection(WorksheetSection section, string name, string? definition = null)
{
section.SetName(name);
section.SetDefinition(definition);
return this;
}

Expand All @@ -88,6 +90,12 @@ public Worksheet SetPublished(bool published)
return this;
}

public Worksheet SetArchived(bool archived)
{
IsArchived = archived;
return this;
}

public Worksheet RemoveSection(WorksheetSection section)
{
Sections.Remove(section);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text.Json.Serialization;
using Volo.Abp;
Expand All @@ -26,6 +27,9 @@ public virtual Worksheet Worksheet
public virtual string Name { get; private set; } = string.Empty;
public virtual uint Order { get; private set; }

[Column(TypeName = "jsonb")]
public virtual string? Definition { get; private set; }

public virtual Collection<CustomField> Fields { get; private set; } = [];

public Guid? TenantId { get; set; }
Expand Down Expand Up @@ -75,6 +79,12 @@ public WorksheetSection SetOrder(uint order)
return this;
}

public WorksheetSection SetDefinition(string? definition)
{
Definition = definition;
return this;
}

public WorksheetSection RemoveField(CustomField field)
{
Fields.Remove(field);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AutoMapper;
using System.Linq;
using System.Text.Json;
using Unity.Flex.Domain.ScoresheetInstances;
using Unity.Flex.Domain.Scoresheets;
using Unity.Flex.Domain.WorksheetInstances;
Expand All @@ -21,7 +22,9 @@ public FlexApplicationAutoMapperProfile()
.ForMember(dest => dest.TotalFields, opt => opt.MapFrom(s => s.Sections.SelectMany(s => s.Fields).Count()));

CreateMap<WorksheetLink, WorksheetLinkDto>();
CreateMap<WorksheetSection, WorksheetSectionDto>();
CreateMap<WorksheetSection, WorksheetSectionDto>()
.ForMember(dest => dest.FieldWidth, opt => opt.MapFrom(src =>
ParseFieldWidth(src.Definition)));
CreateMap<WorksheetInstance, WorksheetInstanceDto>();
CreateMap<CustomFieldValue, CustomFieldValueDto>().ReverseMap();
CreateMap<CustomField, CustomFieldDto>();
Expand All @@ -46,4 +49,17 @@ public FlexApplicationAutoMapperProfile()
CreateMap<ScoresheetInstance, ScoresheetInstanceDto>();
CreateMap<Answer, AnswerDto>();
}

private static int? ParseFieldWidth(string? definition)
{
if (string.IsNullOrEmpty(definition)) return null;
try
{
using var doc = JsonDocument.Parse(definition);
if (doc.RootElement.TryGetProperty("fieldWidth", out var prop) && prop.TryGetInt32(out var value))
return value > 0 ? value : null;
}
catch { /* malformed JSON — fall through */ }
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ public virtual async Task<bool> PublishAsync(Guid id)
return await Task.FromResult(true);
}

public virtual async Task<bool> ArchiveAsync(Guid id, bool archive)
{
var worksheet = await worksheetRepository.GetAsync(id);
_ = worksheet.SetArchived(archive);
return await Task.FromResult(true);
}

[Authorize(FlexPermissions.Worksheets.Delete)]
public virtual async Task DeleteAsync(Guid id)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Unity.Flex.Domain.Worksheets;
using Volo.Abp;
Expand All @@ -20,7 +21,11 @@ public virtual async Task<WorksheetSectionDto> EditAsync(Guid id, EditSectionDto
{
(Worksheet worksheet, WorksheetSection section) = await GetWorksheetAndSectionAsync(id);

_ = worksheet.UpdateSection(section, dto.Name.Trim());
string? definition = dto.FieldWidth is > 0
? JsonSerializer.Serialize(new { fieldWidth = dto.FieldWidth })
: null;

_ = worksheet.UpdateSection(section, dto.Name.Trim(), definition);
return ObjectMapper.Map<WorksheetSection, WorksheetSectionDto>(section);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
"Scoresheet:Configuration:DiscardChangesButtonText": "DISCARD CHANGES",
"Worksheet:Configuration:SaveChangesButtonText": "SAVE CHANGES",
"Worksheet:Configuration:DiscardChangesButtonText": "DISCARD CHANGES",
"Worksheet:Configuration:EditWorksheetButtonText": "Edit Worksheet",
"Worksheet:Configuration:EditWorksheetButtonText": "Edit",
"Worksheet:Configuration:AddCustomFieldButtonText": "Add Field",
"Worksheet:Configuration:AddSectionButtonText": "ADD SECTION",
"Worksheet:Configuration:AddWorksheetButtonText": "ADD WORKSHEET",
"Worksheet:Configuration:LinkWorksheetButtonText": "Link Worksheet",
"Worksheet:Configuration:CloneWorksheetButtonText": "Clone Worksheet",
"Worksheet:Configuration:PublishWorksheetButtonText": "Publish Worksheet",
"Worksheet:Configuration:DeleteWorksheetButtonText": "Delete Worksheet",
"Worksheet:Configuration:AddWorksheetButtonText": "ADD",
"Worksheet:Configuration:LinkWorksheetButtonText": "Link",
"Worksheet:Configuration:CloneWorksheetButtonText": "Clone",
"Worksheet:Configuration:PublishWorksheetButtonText": "Publish",
"Worksheet:Configuration:DeleteWorksheetButtonText": "Delete",
"Worksheet:Configuration:AddCheckboxOptionText": "Add Option",
"Worksheet:Configuration:ExportWorksheetButtonText": "Export Worksheet",
"Worksheet:Configuration:ExportWorksheetButtonText": "Export",
"Worksheet:Configuration:AddSelectListOptionText": "Add Option",
"Worksheet:Configuration:AddColumnOptionText": "Add Column",
"DataGrids:DynamicColumnsHeader": "Dynamic Columns",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ public class CustomFieldDefinition
[JsonPropertyName("required")]
public bool Required { get; set; } = false;

[JsonPropertyName("isHidden")]
public bool IsHidden { get; set; } = false;

[JsonPropertyName("hideLabel")]
public bool HideLabel { get; set; } = false;

[JsonPropertyName("isDisabled")]
public bool IsDisabled { get; set; } = false;

[JsonPropertyName("labelPosition")]
public string LabelPosition { get; set; } = "Top";

[JsonPropertyName("style")]
public string? Style { get; set; }

[JsonPropertyName("cssClass")]
public string? CssClass { get; set; }

[JsonPropertyName("labelStyle")]
public string? LabelStyle { get; set; }

[JsonPropertyName("labelCssClass")]
public string? LabelCssClass { get; set; }

[JsonPropertyName("securityClassification")]
public string? SecurityClassification { get; set; }

[JsonPropertyName("placeholder")]
public string? Placeholder { get; set; }

public CustomFieldDefinition() : base()
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,6 @@
@page
@using Microsoft.Extensions.Localization;
@using Unity.Flex.Localization;
@using Unity.Flex.Web.Pages.WorksheetConfiguration;
@using Unity.Flex.Web.Views.Shared.Components.WorksheetList
@using Volo.Abp.Features;
@using Unity.Flex.Web.Views.Shared.Components.WorksheetConfiguration
@model Unity.Flex.Web.Pages.WorksheetConfiguration.IndexModel;

@inject IStringLocalizer<FlexResource> L
@inject IFeatureChecker FeatureChecker

@section styles
{
<abp-style src="/Pages/WorksheetConfiguration/Index.css" />
}
@section scripts
{
<abp-script src="/Pages/WorksheetConfiguration/Index.js" />
<abp-script src="/libs/sortablejs/Sortable.js" />
}

@if (await FeatureChecker.IsEnabledAsync("Unity.Flex"))
{
<input type="hidden" id="MaxFileSize" value="@Model.MaxFileSize" />
<div class="worksheet-scrollable-content">
<abp-row class="m-0 h-100 worksheet-configuration-container">
<abp-column class="p-0">
<abp-card>
<abp-card-body>
<h4><b>Worksheets</b></h4>
<div class="d-flex justify-content-end m-3">
<form id="form" name="form" action="/uploader" enctype="multipart/form-data" method="post">
<input id="worksheet_import_upload" name="worksheet_import_upload" type="file" size="1" onchange="importWorksheetFile('worksheet_import_upload');" style="display: none" />
<abp-button text="Import Worksheet"
id="worksheet_import_upload_btn"
icon-type="Other"
icon="fl fl-import"
button-type="Light" />
</form>
</div>
<div id="worksheet-info-widget-list">
@await Component.InvokeAsync(typeof(WorksheetListWidget))
</div>
<div class="p-4">
<abp-button text="@L["Worksheet:Configuration:AddWorksheetButtonText"].Value"
id="add_worksheet_btn"
icon-type="Other"
icon="fl fl-plus"
button-type="Light" />
</div>
</abp-card-body>
</abp-card>
</abp-column>
<abp-column class="pe-0 ps-2 preview-scrollable">
<abp-card class="right-card sticky-preview">
<abp-card-body>
<h4><b>Preview</b></h4>
<div id="preview">
<p>No sections to display.</p>
</div>
</abp-card-body>
</abp-card>
</abp-column>
</abp-row>
</div>
}
@await Component.InvokeAsync(typeof(WorksheetConfigurationViewComponent))
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,60 @@
flex-wrap: nowrap;
}

.worksheet-configuration-container > div {
overflow-y: scroll;
#worksheet-left-col {
overflow: hidden;
}

.worksheet-left-header {
position: sticky;
top: 0;
z-index: 10;
background-color: var(--bs-card-bg, #fff);
padding: 1rem 1rem 0;
border-bottom: 1px solid var(--bs-border-color, #dee2e6);
padding-bottom: 0.5rem;
margin-bottom: 0.5rem;
}

.worksheet-left-body {
overflow-y: auto;
flex: 1 1 auto;
padding: 0 1rem;
}


.column-resizer {
width: 6px;
cursor: col-resize;
background-color: #dee2e6;
flex-shrink: 0;
transition: background-color 0.15s;
border-radius: 3px;
}

.column-resizer:hover,
.column-resizer.dragging {
background-color: var(--bs-accordion-active-bg);
}

.worksheet-filters {
flex-wrap: nowrap;
}

#worksheet-accordion {
padding-top: 1px;
}

.btn-label-position {
border: 2px solid #acb2b7;
background-color: transparent;
color: inherit;
}

.btn-check:checked + .btn-label-position {
background-color: #acb2b7;
border: 2px solid var(--bc-colors-blue-primary);
color: inherit;
}

.worksheet-scrollable-content {
Expand Down Expand Up @@ -36,4 +88,33 @@
.sticky-preview {
position: sticky;
top: 0;
}

/* Custom field modal section headings */
.cf-section-heading {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--bs-secondary-color, #6c757d);
padding-bottom: 0.35rem;
border-bottom: 1px solid var(--bs-border-color, #dee2e6);
margin-top: 1.25rem;
margin-bottom: 0.75rem;
}

.cf-section-heading:first-child {
margin-top: 0;
}

/* Tab error indicator badge */
.tab-error-badge {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: var(--bs-danger, #dc3545);
margin-left: 6px;
vertical-align: middle;
flex-shrink: 0;
}
Loading
Loading