add clear filters to plan listing filters dialog, changes lost dialog > change "LEAVE" to lowercase

This commit is contained in:
mchouliara 2024-08-30 10:46:45 +03:00
parent ffe8b6b672
commit fb4712fc43
14 changed files with 40 additions and 22 deletions

View File

@ -103,21 +103,21 @@
</div> </div>
<!-- End of Reference Types --> <!-- End of Reference Types -->
<!-- <div class="col-10 d-flex justify-content-between mb-4"> <div class="col-10 d-flex justify-content-between mb-4">
<button mat-button class="rounded-btn secondary" (click)="resetFilters()" style="font-size: 0.87rem;"> <button mat-button class="normal-btn-sm rounded-btn secondary" (click)="resetFilters()" style="font-size: 0.87rem;">
Reset {{'PLAN-LISTING.FILTERS.RESET-FILTERS' | translate}}
</button> </button>
<button class="normal-btn-sm" (click)="controlModified()"> <button class="normal-btn-sm" (click)="controlModified()">
{{'PLAN-LISTING.FILTERS.APPLY-FILTERS' | translate}} {{'PLAN-LISTING.FILTERS.APPLY-FILTERS' | translate}}
</button> </button>
</div>
<!--
<div class="d-flex mb-4">
<button class="normal-btn-sm" (click)="controlModified()">
{{'PLAN-LISTING.FILTERS.APPLY-FILTERS' | translate}}
</button>
</div> --> </div> -->
<div class="d-flex mb-4">
<button class="normal-btn-sm" (click)="controlModified()">
{{'PLAN-LISTING.FILTERS.APPLY-FILTERS' | translate}}
</button>
</div>
</div> </div>
</div> </div>

View File

@ -104,7 +104,16 @@ export class PlanFilterComponent extends BaseCriteriaComponent<PlanListingFilter
} }
resetFilters(){ resetFilters(){
this.buildForm(null); this.formGroup.reset();
this.formGroup.patchValue({
descriptionTemplates: null,
planBlueprints: null,
references: null,
role: null,
status: null,
viewOnlyTenant: null
});
this.referenceAutocompleteConfiguration.clear();
} }
onCallbackError(error: any) { onCallbackError(error: any) {

View File

@ -408,7 +408,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
private _patchLookupFromFilters(filters: PlanListingFilters): PlanLookup { private _patchLookupFromFilters(filters: PlanListingFilters): PlanLookup {
this.lookup.statuses = filters?.status !== null ? [filters.status] : []; this.lookup.statuses = filters?.status !== null ? [filters.status] : null;
// Tenants // Tenants
let viewOnlyTenant = filters?.viewOnlyTenant ?? false; let viewOnlyTenant = filters?.viewOnlyTenant ?? false;

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -756,6 +756,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",

View File

@ -238,7 +238,7 @@
"MESSAGE": "If you leave, your changes will be lost.", "MESSAGE": "If you leave, your changes will be lost.",
"ACTIONS": { "ACTIONS": {
"CANCEL": "Cancel", "CANCEL": "Cancel",
"LEAVE": "LEAVE" "LEAVE": "Leave"
} }
}, },
"FIELDS": { "FIELDS": {
@ -758,6 +758,7 @@
"FILTERS": { "FILTERS": {
"NAME": "Filters", "NAME": "Filters",
"APPLY-FILTERS": "Apply filters", "APPLY-FILTERS": "Apply filters",
"RESET-FILTERS": "Reset",
"NO-ITEMS-FOUND": "Your search didn't match any items.", "NO-ITEMS-FOUND": "Your search didn't match any items.",
"STATUS": { "STATUS": {
"NAME": "Status", "NAME": "Status",