Skip to content
Merged

Dev #2760

Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -1,18 +1,9 @@
@page
@model Unity.AI.Web.Pages.AIReporting.IndexModel

@section styles {
@if (Model.CanViewAiReporting)
{
<abp-style src="/libs/bootstrap/css/bootstrap.css" />
}
}

@section scripts {
@if (Model.CanViewAiReporting)
{
<abp-script src="/libs/jquery/jquery.js" />
<abp-script src="/libs/bootstrap-4/dist/js/bootstrap.min.js"></abp-script>
<script>
globalThis.reportingAiUrl = @Json.Serialize(Model.ReportingAiUrl);
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public async Task<List<PaymentRequest>> GetPagedPaymentRequestsWithIncludesAsync
if (includeTags)
{
paymentsQueryable = paymentsQueryable
.Include(pr => pr.PaymentTags)
.Include(pr => pr.PaymentTags!)
.ThenInclude(pt => pt.Tag);
}

Expand All @@ -161,9 +161,7 @@ public async Task<List<PaymentRequest>> GetPagedPaymentRequestsWithIncludesAsync
paymentsQueryable = paymentsQueryable.Include(pr => pr.ExpenseApprovals);
}

#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var paymentWithIncludes = await paymentsQueryable.ToListAsync();
#pragma warning restore CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.

return paymentWithIncludes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ public partial class PaymentRequestToPaymentRequestDtoMapper : MapperBase<Paymen
[MapperIgnoreTarget(nameof(PaymentRequestDto.ErrorSummary))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.AccountCodingDisplay))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.CreatorUser))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.ApplicantId))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.Category))]
public override partial PaymentRequestDto Map(PaymentRequest source);

[MapperIgnoreTarget(nameof(PaymentRequestDto.ErrorSummary))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.AccountCodingDisplay))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.CreatorUser))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.ApplicantId))]
[MapperIgnoreTarget(nameof(PaymentRequestDto.Category))]
public override partial void Map(PaymentRequest source, PaymentRequestDto destination);

[MapperIgnoreTarget(nameof(ExpenseApprovalDto.DecisionUser))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ $(function () {
const formatter = createNumberFormatter();

const l = abp.localization.getResource('GrantManager');
toastr.options.positionClass = 'toast-top-center';


const UIElements = {
accountCodingDT: $('#AccountCodesDataTable'),
Expand Down Expand Up @@ -391,12 +389,12 @@ $(function () {
function updatePaymentPrefix() {
unity.payments.paymentConfigurations.paymentConfiguration.updatePaymentPrefix(UIElements.paymentPrefixInput.val())
.done(function () {
toastr.success('Payment prefix updated successfully.');
abp.notify.success('Payment prefix updated successfully.');
$('#payment-id-prefix-original').val(UIElements.paymentPrefixInput.val());
checkEnableDiscard();
})
.fail(function () {
toastr.error('Failed to update payment prefix.');
abp.notify.error('Failed to update payment prefix.');
});
};

Expand All @@ -412,7 +410,7 @@ $(function () {

function discardPaymentPrefix() {
UIElements.paymentPrefixInput.val(UIElements.originalPaymentPrefix.val());
toastr.info('Payment prefix changes discarded.');
abp.notify.info('Payment prefix changes discarded.');
checkEnableDiscard();
};

Expand All @@ -427,10 +425,10 @@ function clearFilter() {
function handleDefaultAccountCodeRadioClick(id) {
$('#AccountCodingId').val(id); // Update the hidden input with the selected account code ID
unity.payments.paymentConfigurations.paymentConfiguration.setDefaultAccountCode(id).done(function () {
toastr.success('Successfully set default account code. Reloading account codes.');
clearAccountCodesSearchAndReload();
abp.notify.success('Successfully set default account code. Reloading account codes.');
clearAccountCodesSearchAndReload();
}).fail(function () {
toastr.error('Failed to set default account code.');
abp.notify.error('Failed to set default account code.');
});
};

Expand Down
2 changes: 1 addition & 1 deletion applications/Unity.GrantManager/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sonar.tests=test
sonar.qualitygate.wait=true

# SonarQube Exclusions (generic build artifacts and generated code only)
sonar.exclusions=src/Unity.GrantManager.EntityFrameworkCore/Migrations/**,src/Unity.GrantManager.EntityFrameworkCore/Scripts/**,**/bin/**,**/obj/**,**/wwwroot/lib/**,**/*.Designer.cs,**/node_modules/**
sonar.exclusions=src/Unity.GrantManager.EntityFrameworkCore/Migrations/**,src/Unity.GrantManager.EntityFrameworkCore/Scripts/**,**/bin/**,**/obj/**,**/wwwroot/libs/**,**/*.Designer.cs,**/node_modules/**

# Rule exclusion: javascript:S7721 "Functions should be moved to the highest possible scope"
# Disabled project-wide for JS. ABP renders pages by composing many independent widgets,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY ["NuGet.Config", "."]
COPY ["common.props", "."]
COPY ["src/Unity.GrantManager.DbMigrator/Unity.GrantManager.DbMigrator.csproj", "src/Unity.GrantManager.DbMigrator/"]
COPY ["src/Unity.GrantManager.Application.Contracts/Unity.GrantManager.Application.Contracts.csproj", "src/Unity.GrantManager.Application.Contracts/"]
COPY ["src/Unity.GrantManager.Domain.Shared/Unity.GrantManager.Domain.Shared.csproj", "src/Unity.GrantManager.Domain.Shared/"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ else
</div>
<div class="m-4 d-flex justify-content-center">
<div class="spinner-border">
<span class="sr-only">Loading...</span>
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
let worksheetMapColumn = document.querySelector('#worksheet-map-available-fields-column');
let excludedIntakeMappings = new Set(['ConfirmationId', 'SubmissionId', 'SubmissionDate']);
let dataTable;
if (globalThis.toastr) { toastr.options.positionClass = 'toast-top-center'; }

let allowableTypes = new Set(['textarea',
'orgbook',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
@using Unity.GrantManager.Web.Pages.Dashboard

@section styles {
<abp-style src="/libs/select2/dist/css/select2.css" />
<abp-style src="/libs/select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme.css" />
<abp-style src="/Pages/Dashboard/Index.css" />
<abp-style src="/libs/bootstrap/css/bootstrap.css" />
<abp-style src="/libs/bootstrap-select/dist/css/bootstrap-select.css" />
}
@section scripts
{
<abp-script src="/libs/select2/dist/js/select2.full.js" />
<abp-script src="/Pages/Dashboard/Index.js" />
<abp-script src="/libs/jquery/jquery.js" />
<abp-script src="/libs/popper.js/dist/umd/popper.js"></abp-script>
<abp-script src="/libs/bootstrap-4/dist/js/bootstrap.js"></abp-script>
<abp-script src="/libs/bootstrap-select/dist/js/bootstrap-select.js"></abp-script>
<abp-script src="/libs/echarts/echarts.min.js" />
}
<div class="dashboard-scrollable-content">
Expand All @@ -32,32 +29,27 @@
<div class="d-flex align-items-stretch gap-2 px-1">
<abp-row class="m-0 p-0">
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.Tags" suppress-label="true" asp-items="@Model.TagsOptionsList" id="dashboardTags" multiple title="TAGS" data-original-text="TAGS" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none"
onchange="reloadDashboard()">
<abp-select asp-for="@Model.Tags" suppress-label="true" asp-items="@Model.TagsOptionsList" id="dashboardTags" multiple title="TAGS" onchange="reloadDashboard()">
</abp-select>
</abp-column>
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.Assignees" suppress-label="true" asp-items="@Model.AssigneesOptionList" id="dashboardAssignees" multiple title="ASSIGNEES" data-original-text="ASSIGNEES" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none"
onchange="reloadDashboard()">
<abp-select asp-for="@Model.Assignees" suppress-label="true" asp-items="@Model.AssigneesOptionList" id="dashboardAssignees" multiple title="ASSIGNEES" onchange="reloadDashboard()">
</abp-select>
</abp-column>
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.IntakeIds" suppress-label="true" asp-items="@Model.IntakeOptionsList" id="dashboardIntakeId" multiple title="INTAKES" data-original-text="INTAKES" data-checkbox="false" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none">
<abp-select asp-for="@Model.IntakeIds" suppress-label="true" asp-items="@Model.IntakeOptionsList" id="dashboardIntakeId" multiple title="INTAKES">
</abp-select>
</abp-column>
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.CategoryNames" suppress-label="true" asp-items="@Model.CategoryOptionsList" id="dashboardCategoryName" multiple title="CATEGORIES" data-original-text="CATEGORIES" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none"
onchange="reloadDashboard()">
<abp-select asp-for="@Model.CategoryNames" suppress-label="true" asp-items="@Model.CategoryOptionsList" id="dashboardCategoryName" multiple title="CATEGORIES" onchange="reloadDashboard()">
</abp-select>
</abp-column>
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.Statuses" suppress-label="true" asp-items="@Model.StatusOptionsList" id="dashboardStatuses" multiple title="STATUS" data-original-text="STATUS" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none"
onchange="reloadDashboard()">
<abp-select asp-for="@Model.Statuses" suppress-label="true" asp-items="@Model.StatusOptionsList" id="dashboardStatuses" multiple title="STATUS" onchange="reloadDashboard()">
</abp-select>
</abp-column>
<abp-column size="_2" class="px-1 application-dashboard-dropdown">
<abp-select asp-for="@Model.SubStatuses" suppress-label="true" asp-items="@Model.SubStatusActionList" id="dashboardSubStatus" multiple title="SUB-STATUS" data-original-text="SUB-STATUS" data-live-search="true" data-style="btn btn-group dt-buttons btn-secondary buttons-collection dropdown-toggle custom-table-btn flex-none"
onchange="reloadDashboard()">
<abp-select asp-for="@Model.SubStatuses" suppress-label="true" asp-items="@Model.SubStatusActionList" id="dashboardSubStatus" multiple title="SUB-STATUS" onchange="reloadDashboard()">
</abp-select>
</abp-column>
</abp-row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,143 @@
justify-content: center;
}

.application-dashboard-dropdown select {
display: none !important;
}

.application-dashboard-date {
min-width: 250px;
margin-top: 10px;
font-size: 14px;
font-weight: bold;
}

.bs-actionsbox {
margin-top: 4px;
}

.bs-actionsbox .btn-group {
/* Select All / Deselect All controls injected into the Select2 dropdown,
replacing bootstrap-select's actionsBox. */
.dashboard-actionsbox {
display: flex;
justify-content: space-between;
gap: 8px;
gap: var(--bc-layout-margin-small);
padding: var(--bc-layout-margin-xsmall);
}

.bs-actionsbox .btn-group button {
.dashboard-actionsbox button {
flex: 1 1 auto;
width: auto;
}

/* The filter dropdowns always show a fixed label, so style them as the
toolbar buttons they replace (see .custom-table-btn in unity-styles.css)
rather than as multi-select inputs. */
.application-dashboard-dropdown .select2-container--bootstrap-5 .select2-selection {
position: relative;
/* Fixed rather than content-driven so all six stay level: "SUB-STATUS" is
long enough to wrap and would otherwise make its box taller. Not
--bc-input-field-height (34px), which nothing in this toolbar uses. */
height: 38px;
min-height: 38px;
display: flex;
align-items: center;
padding: 0 1.75rem 0 0.75rem;
/* Matches the literal in .custom-table-btn; the theme has no radius token. */
border-radius: 5px;
background-color: var(--bc-colors-white-primary-500);
}

.application-dashboard-dropdown .select2-container--bootstrap-5 .select2-selection:hover {
border-color: var(--bc-colors-blue-primary);
}

/* The label is written straight into the <ul>, so strip its list styling and
keep it on one line: "SUB-STATUS" wrapping made that box taller than the
other five and broke the row alignment. */
.application-dashboard-dropdown .select2-container--bootstrap-5 .select2-selection__rendered {
display: block;
/* Grow to fill the button: overflow:hidden below zeroes a flex item's
automatic minimum size, so without this the label collapses and
ellipsises even though there is room for it. */
flex: 1 1 auto;
margin: 0;
padding: 0;
list-style: none;
color: var(--bc-colors-blue-primary);
/* These filters replaced buttons styled with .btn/.dt-buttons, so use the
theme's button size rather than the base body size. layout.css feeds the
same variable into --bs-btn-font-size. */
font-size: var(--bc-font-size-btn);
font-weight: 700;
text-transform: uppercase;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* Select2 only draws an arrow for single selects, so supply one. */
.application-dashboard-dropdown .select2-container--bootstrap-5 .select2-selection::after {
content: "";
position: absolute;
right: 0.75rem;
top: 50%;
transform: translateY(-25%);
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 5px solid var(--bc-colors-blue-primary);
pointer-events: none;
}

/* For multiple selects Select2 renders the search field inline in the control,
as a sibling of the label, and the two compete for width. Rather than move
the field (which detaches it from Select2's filtering), swap which one is
visible: label while closed, search while open. */
.application-dashboard-dropdown .select2-container:not(.select2-container--open) .select2-search--inline {
display: none;
}

.application-dashboard-dropdown .select2-container--open .select2-selection__rendered {
display: none;
}

/* Select2 sizes the inline search field to its content, which clips the
placeholder to a character or two. The label is hidden while open, so give
the field the whole control. */
.application-dashboard-dropdown .select2-container--open .select2-search--inline,
.application-dashboard-dropdown .select2-container--open .select2-search--inline .select2-search__field {
width: 100% !important;
margin: 0;
}

/* Everything below is scoped to dashboard-filter-dropdown (set via
dropdownCssClass) because Select2 renders panels at the end of <body>,
outside .application-dashboard-dropdown. */

/* Selected entries get a light tint and a checkmark rather than the theme's
solid fill, which turned the whole list blue given these filters default to
everything selected.
These selectors deliberately mirror the shape of the ones in
select2-bootstrap-5-theme.css and add .dashboard-filter-dropdown on top:
the theme's are five classes deep, so anything shorter loses to them. */
.select2-container--bootstrap-5 .select2-dropdown.dashboard-filter-dropdown .select2-results__options .select2-results__option.select2-results__option--selected {
/* Same tint the theme uses for pressed state and DataTables selected rows
(--dt-row-selected is the same colour), so selection reads consistently. */
background-color: var(--bc-colors-grey-pressed);
color: var(--bc-type-color-primary);
}

.select2-container--bootstrap-5 .select2-dropdown.dashboard-filter-dropdown .select2-results__options .select2-results__option.select2-results__option--selected::after {
content: "\2713";
float: right;
color: var(--bc-type-color-primary);
}

/* Keyboard position: subtle, so it does not look like a hover left behind.
Declared before :hover so that hovering the keyboard-highlighted option
still shows the hover colour, since both carry the same specificity. */
.select2-container--bootstrap-5 .select2-dropdown.dashboard-filter-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted {
background-color: var(--bc-colors-grey-hover);
color: var(--bc-type-color-primary);
}

/* Mouse feedback comes from :hover, not Select2's --highlighted class, which
marks the keyboard position and lingers once the pointer leaves the list.
--bc-colors-blue-hover is the theme's hover tint and is light enough to keep
the text and checkmark readable in their normal colour. */
.select2-container--bootstrap-5 .select2-dropdown.dashboard-filter-dropdown .select2-results__options .select2-results__option:hover {
background-color: var(--bc-colors-blue-hover);
color: var(--bc-type-color-primary);
}
Loading
Loading