Skip to content
Merged

Dev #2624

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cac4971
AB#32598 initial commit, still WIP
AndreGAot Jun 25, 2026
2ce6700
AB#32598 worksheet datagrid row delete for non-dynamic
AndreGAot Jun 26, 2026
1c218f5
AB#28586 - Payment List Save View and Performance
DavidBrightBcGov Jun 26, 2026
737d2a6
AB#32598 code cleanup
AndreGAot Jun 26, 2026
1d735bd
AB#28586 - Payment List Save View and Performance
DavidBrightBcGov Jun 26, 2026
7068a7e
AB#32598 sonarqube fixes
AndreGAot Jun 26, 2026
c03d91c
AB#28586 - Fix for missing the select checbox column as per default view
DavidBrightBcGov Jun 26, 2026
e4c4c16
Merge branch 'dev' into feature/AB#28586-payment-list-save-view-perfo…
DavidBrightBcGov Jun 27, 2026
70da588
AB#28586 / AB#33087 compatability merge for payment save view / new c…
DavidBrightBcGov Jun 27, 2026
e4159a7
AB#28586 refactored MapToDtoAndLoadDetailsAsync to simplify for cogni…
DavidBrightBcGov Jun 29, 2026
741f49d
AB#28589 - Adding category to dynamic loading of data
DavidBrightBcGov Jun 29, 2026
7d15374
AB#28586 - Missed category refresh of data column
DavidBrightBcGov Jun 29, 2026
812379d
Merge pull request #2621 from bcgov/feature/AB#28586-payment-list-sav…
DavidBrightBcGov Jun 29, 2026
ce64fdf
AB#33505: Bugfix: Submission # Hyperlink Is Tied to Applicant Permission
aurelio-aot Jun 29, 2026
e123036
Merge pull request #2623 from bcgov/bugfix/AB#33505-Missing-Submissio…
JamesPasta Jul 2, 2026
3213338
Merge pull request #2615 from bcgov/feature/AB#32598-worksheetdatagri…
JamesPasta Jul 2, 2026
3a73129
features/AB#33374-NotificationsRolePermissions
JamesPasta Jul 2, 2026
b9eb89c
Merge pull request #2625 from bcgov/features/AB#33374-NotificationsRo…
JamesPasta Jul 2, 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 @@ -279,6 +279,22 @@ internal async Task<WriteDataRowResponse> UpdateRowAsync(RowInputData rowInputDa
};
}

internal async Task DeleteRowAsync(Guid valueId, uint row, Guid worksheetInstanceId)
{
var currentValue = await customFieldValueAppService.GetAsync(valueId);
var dataGridValue = DataGridServiceUtils.DeserializeDataGridValue(currentValue.CurrentValue);
if (dataGridValue == null) return;

var dataGridRowsValue = DataGridServiceUtils.DeserializeDataGridRowsValue(dataGridValue.Value?.ToString());
if (dataGridRowsValue == null || row >= (uint)dataGridRowsValue.Rows.Count) return;

dataGridRowsValue.Rows.RemoveAt((int)row);
dataGridValue.Value = dataGridRowsValue;

await customFieldValueAppService.ExplicitSetAsync(valueId, JsonSerializer.Serialize(dataGridValue));
await customFieldValueAppService.SyncWorksheetInstanceValueAsync(worksheetInstanceId);
}

internal async Task<List<Tuple<string, string, CustomFieldType>>> GenerateKeyValueTypesAsync(Guid customFieldId, Dictionary<string, string>? keyValuePairs)
{
var result = new List<Tuple<string, string, CustomFieldType>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<ProjectReference Include="..\Unity.Flex.Application.Contracts\Unity.Flex.Application.Contracts.csproj" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Unity.Flex.Application.Tests" />
</ItemGroup>

<ItemGroup>
<Content Update="Views\Shared\Components\RadioDefinitionWidget\Default.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
using Unity.Flex.Web.Pages.Flex;
using Unity.Flex.Web.Views.Shared.Components.WorksheetInstanceWidget.ViewModels;
using Unity.Flex.Worksheets;
using Unity.Flex.WorksheetInstances;
using Volo.Abp.AspNetCore.Mvc;

namespace Unity.Flex.Web.Views.Shared.Components.DataGridWidget
{
[ApiExplorerSettings(IgnoreApi = true)]
[Route("Flex/Widgets/DataGrid")]
public class DataGridWidgetController : AbpController
public class DataGridWidgetController(
ICustomFieldAppService customFieldAppService,
ICustomFieldValueAppService customFieldValueAppService,
DataGridWriteService dataGridWriteService) : AbpController
{
[HttpGet]
[Route("Refresh")]
Expand All @@ -33,5 +41,54 @@ public IActionResult Refresh(WorksheetFieldViewModel? fieldModel,
worksheetInstanceId
});
}

[Authorize]
[HttpPost]
[Route("DeleteRow")]
public async Task<IActionResult> DeleteRow(
Guid valueId,
uint row,
Guid worksheetInstanceId)
{
await dataGridWriteService.DeleteRowAsync(valueId, row, worksheetInstanceId);
return new OkObjectResult(new { row, worksheetInstanceId });
}

[Authorize]
[HttpGet]
[Route("RefreshByField")]
public async Task<IActionResult> RefreshByField(
Guid valueId,
Guid fieldId,
string modelName,
Guid worksheetId,
Guid worksheetInstanceId,
string uiAnchor)
{
var field = await customFieldAppService.GetAsync(fieldId);
var value = await customFieldValueAppService.GetAsync(valueId);

var fieldModel = new WorksheetFieldViewModel
{
Id = field.Id,
Name = field.Name,
Label = field.Label,
Type = field.Type,
Order = field.Order,
Enabled = field.Enabled,
Definition = field.Definition,
CurrentValue = value.CurrentValue,
CurrentValueId = valueId,
UiAnchor = uiAnchor
};

return ViewComponent(typeof(DataGridWidget), new
{
fieldModel,
modelName,
worksheetId,
worksheetInstanceId
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@
.custom-grid-container {
display: flex;
flex-direction: column;
position: relative;
}

.grid-loading-overlay {
position: absolute;
inset: 0;
background: rgba(255, 255, 255, 0.75);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}

.grid-position {
Expand Down Expand Up @@ -61,4 +72,31 @@
color: #8a8886;
margin-left: 4px;
vertical-align: middle;
}

.custom-dynamic-table .dropdown {
display: inline-block;
}

.custom-dynamic-table .dropdown-content {
display: none;
position: fixed;
right: auto;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1039;
--bs-btn-active-color: var(--bc-colors-white-primary-500);
--bs-btn-active-bg: var(--bc-colors-blue-primary-500);
}

.custom-dynamic-table .dropdown:hover .dropdown-content {
display: block;
}

.custom-dynamic-table .dropdown-content .btn.fullWidth {
width: calc(100% - 16px);
display: block;
text-align: left;
margin: 10px 8px;
}
Loading
Loading