@hmcts/ccd-case-ui-toolkit 7.3.74-user-by-idam-rework-v2 → 7.3.75-CME-1106-material-datetime
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,9 +38,10 @@ import * as i6$1 from '@angular/cdk/tree';
|
|
|
38
38
|
import { NestedTreeControl, CdkTreeModule } from '@angular/cdk/tree';
|
|
39
39
|
import * as i2$1 from '@angular/platform-browser';
|
|
40
40
|
import { cloneDeep } from 'lodash';
|
|
41
|
-
import * as i4$1 from '@
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
41
|
+
import * as i4$1 from '@ngxmc/datetime-picker';
|
|
42
|
+
import { NgxMatDatepickerActions, NgxMatDatetimepicker, NgxMatDatepickerApply, NgxMatDatepickerInput } from '@ngxmc/datetime-picker';
|
|
43
|
+
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE, DateAdapter } from '@angular/material/core';
|
|
44
|
+
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
44
45
|
import * as i5 from '@angular/material/legacy-form-field';
|
|
45
46
|
import { MatLegacyFormFieldModule } from '@angular/material/legacy-form-field';
|
|
46
47
|
import * as i6$2 from '@angular/material/datepicker';
|
|
@@ -1466,7 +1467,7 @@ class HttpError {
|
|
|
1466
1467
|
this.callbackWarnings = null;
|
|
1467
1468
|
}
|
|
1468
1469
|
static DEFAULT_ERROR = 'Unknown error';
|
|
1469
|
-
static DEFAULT_MESSAGE = '
|
|
1470
|
+
static DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
|
|
1470
1471
|
static DEFAULT_STATUS = 500;
|
|
1471
1472
|
static MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
|
|
1472
1473
|
timestamp;
|
|
@@ -1854,13 +1855,13 @@ function getUserDetails(sessionStorageService) {
|
|
|
1854
1855
|
}
|
|
1855
1856
|
function isInternalUser(sessionStorageService) {
|
|
1856
1857
|
const userDetails = getUserDetails(sessionStorageService);
|
|
1857
|
-
return
|
|
1858
|
+
return userDetails && userDetails?.roles
|
|
1858
1859
|
&& !(userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
1859
1860
|
|| userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1860
1861
|
}
|
|
1861
1862
|
function isJudiciaryUser(sessionStorageService) {
|
|
1862
1863
|
const userDetails = getUserDetails(sessionStorageService);
|
|
1863
|
-
return
|
|
1864
|
+
return userDetails && userDetails?.roles
|
|
1864
1865
|
&& (userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1865
1866
|
}
|
|
1866
1867
|
|
|
@@ -8669,32 +8670,31 @@ class CaseAccessUtils {
|
|
|
8669
8670
|
static CTSC_ROLE = 'ctsc';
|
|
8670
8671
|
static CTSC_ROLE_CATEGORY = 'CTSC';
|
|
8671
8672
|
static CTSC_ROLE_NAME = 'ctsc';
|
|
8672
|
-
|
|
8673
|
-
getMappedRoleCategories(roles = []) {
|
|
8673
|
+
getMappedRoleCategory(roles = [], roleCategories = []) {
|
|
8674
8674
|
const roleKeywords = roles.join().split('-').join().split(',');
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
roleCategoryList.push(CaseAccessUtils.JUDGE_ROLE_CATEGORY);
|
|
8675
|
+
if (this.roleOrCategoryExists(CaseAccessUtils.JUDGE_ROLE, CaseAccessUtils.JUDGE_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8676
|
+
return CaseAccessUtils.JUDGE_ROLE_CATEGORY;
|
|
8678
8677
|
}
|
|
8679
|
-
if (this.
|
|
8680
|
-
|
|
8678
|
+
else if (this.roleOrCategoryExists(CaseAccessUtils.PROFESSIONAL_ROLE, CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8679
|
+
return CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY;
|
|
8681
8680
|
}
|
|
8682
|
-
if (this.
|
|
8683
|
-
|
|
8681
|
+
else if (this.roleOrCategoryExists(CaseAccessUtils.CITIZEN_ROLE, CaseAccessUtils.CITIZEN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8682
|
+
return CaseAccessUtils.CITIZEN_ROLE_CATEGORY;
|
|
8684
8683
|
}
|
|
8685
|
-
if (this.
|
|
8686
|
-
|
|
8684
|
+
else if (this.roleOrCategoryExists(CaseAccessUtils.ADMIN_ROLE, CaseAccessUtils.ADMIN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8685
|
+
return CaseAccessUtils.ADMIN_ROLE_CATEGORY;
|
|
8687
8686
|
}
|
|
8688
|
-
if (this.
|
|
8689
|
-
|
|
8687
|
+
else if (this.roleOrCategoryExists(CaseAccessUtils.CTSC_ROLE, CaseAccessUtils.CTSC_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8688
|
+
return CaseAccessUtils.CTSC_ROLE_CATEGORY;
|
|
8690
8689
|
}
|
|
8691
|
-
|
|
8692
|
-
|
|
8690
|
+
else {
|
|
8691
|
+
return CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY;
|
|
8693
8692
|
}
|
|
8694
|
-
return roleCategoryList;
|
|
8695
8693
|
}
|
|
8696
|
-
|
|
8697
|
-
|
|
8694
|
+
roleOrCategoryExists(roleKeyword, roleCategory, roleKeywords, roleCategories) {
|
|
8695
|
+
const categoryExists = roleCategories.indexOf(roleCategory) > -1;
|
|
8696
|
+
const keywordExists = roleKeywords.indexOf(roleKeyword) > -1;
|
|
8697
|
+
return categoryExists ? categoryExists : keywordExists;
|
|
8698
8698
|
}
|
|
8699
8699
|
getAMRoleName(accessType, aMRole) {
|
|
8700
8700
|
let roleName = '';
|
|
@@ -9124,10 +9124,10 @@ class CaseworkerService {
|
|
|
9124
9124
|
this.appConfig = appConfig;
|
|
9125
9125
|
this.errorService = errorService;
|
|
9126
9126
|
}
|
|
9127
|
-
|
|
9128
|
-
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/
|
|
9127
|
+
getCaseworkers(serviceId) {
|
|
9128
|
+
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
|
|
9129
9129
|
return this.http
|
|
9130
|
-
.post(url,
|
|
9130
|
+
.post(url, { services: [serviceId] })
|
|
9131
9131
|
.pipe(catchError(error => {
|
|
9132
9132
|
this.errorService.setError(error);
|
|
9133
9133
|
return throwError(error);
|
|
@@ -10579,35 +10579,30 @@ class CasesService {
|
|
|
10579
10579
|
}
|
|
10580
10580
|
createChallengedAccessRequest(caseId, request) {
|
|
10581
10581
|
// Assignment API endpoint
|
|
10582
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
10582
10583
|
const camUtils = new CaseAccessUtils();
|
|
10583
|
-
let userInfo
|
|
10584
|
-
if (
|
|
10585
|
-
|
|
10586
|
-
}
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
const roleCategories = userInfo.roleCategories || camUtils.getMappedRoleCategories(userInfo.roles);
|
|
10590
|
-
// If user has no role categories, default to LEGAL_OPERATIONS
|
|
10591
|
-
const roleName = camUtils.getAMRoleName('challenged', roleCategories?.length > 0 ? roleCategories[0] : "LEGAL_OPERATIONS");
|
|
10584
|
+
let userInfo;
|
|
10585
|
+
if (userInfoStr) {
|
|
10586
|
+
userInfo = JSON.parse(userInfoStr);
|
|
10587
|
+
}
|
|
10588
|
+
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
10589
|
+
const roleName = camUtils.getAMRoleName('challenged', roleCategory);
|
|
10592
10590
|
const beginTime = new Date();
|
|
10593
10591
|
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
10594
10592
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
10595
10593
|
const isNew = true;
|
|
10596
|
-
const payload = camUtils.getAMPayload(id, id, roleName,
|
|
10597
|
-
// EXUI-4758 - Return first roleCategory as the roleCategory
|
|
10598
|
-
roleCategories[0], 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
|
|
10594
|
+
const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
|
|
10599
10595
|
return this.http.post(`/api/challenged-access-request`, payload);
|
|
10600
10596
|
}
|
|
10601
10597
|
createSpecificAccessRequest(caseId, sar) {
|
|
10598
|
+
// Assignment API endpoint
|
|
10599
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
10602
10600
|
const camUtils = new CaseAccessUtils();
|
|
10603
|
-
let userInfo
|
|
10604
|
-
if (
|
|
10605
|
-
|
|
10606
|
-
}
|
|
10607
|
-
|
|
10608
|
-
const roleCategories = userInfo.roleCategories || camUtils.getMappedRoleCategories(userInfo.roles);
|
|
10609
|
-
// EXUI-4758 - Return first roleCategory as the roleCategory for now, unless not present, in which case default to LEGAL_OPERATIONS
|
|
10610
|
-
const roleCategory = roleCategories?.length > 0 ? roleCategories[0] : "LEGAL_OPERATIONS";
|
|
10601
|
+
let userInfo;
|
|
10602
|
+
if (userInfoStr) {
|
|
10603
|
+
userInfo = JSON.parse(userInfoStr);
|
|
10604
|
+
}
|
|
10605
|
+
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
10611
10606
|
const roleName = camUtils.getAMRoleName('specific', roleCategory);
|
|
10612
10607
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
10613
10608
|
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
@@ -12707,9 +12702,12 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
12707
12702
|
this.jurisdiction = task.jurisdiction;
|
|
12708
12703
|
this.caseType = task.case_type_id;
|
|
12709
12704
|
// Current user is a caseworker?
|
|
12710
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
12711
|
-
if (
|
|
12712
|
-
|
|
12705
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
|
|
12706
|
+
if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
|
|
12707
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === task.assignee);
|
|
12708
|
+
if (caseworker) {
|
|
12709
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
12710
|
+
}
|
|
12713
12711
|
}
|
|
12714
12712
|
if (!this.assignedUserName) {
|
|
12715
12713
|
// Current user is a judicial user?
|
|
@@ -30522,7 +30520,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
|
30522
30520
|
this.dateControl.setValue('');
|
|
30523
30521
|
}
|
|
30524
30522
|
}
|
|
30525
|
-
static ɵfac = function DatetimePickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(
|
|
30523
|
+
static ɵfac = function DatetimePickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(MAT_DATE_FORMATS)); };
|
|
30526
30524
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) { if (rf & 1) {
|
|
30527
30525
|
i0.ɵɵviewQuery(_c0$i, 5);
|
|
30528
30526
|
i0.ɵɵviewQuery(_c1$6, 5);
|
|
@@ -30531,13 +30529,13 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
|
30531
30529
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datetimePicker = _t.first);
|
|
30532
30530
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputElement = _t.first);
|
|
30533
30531
|
} }, inputs: { dateControl: "dateControl" }, standalone: false, features: [i0.ɵɵProvidersFeature([
|
|
30534
|
-
{ provide:
|
|
30532
|
+
{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MOMENT_FORMATS },
|
|
30535
30533
|
{
|
|
30536
|
-
provide:
|
|
30537
|
-
useClass:
|
|
30538
|
-
deps: [
|
|
30534
|
+
provide: DateAdapter,
|
|
30535
|
+
useClass: MomentDateAdapter,
|
|
30536
|
+
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]
|
|
30539
30537
|
},
|
|
30540
|
-
{ provide:
|
|
30538
|
+
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } }
|
|
30541
30539
|
]), i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 27, consts: [["input", ""], ["picker", ""], [1, "govuk-form-group", "bottom-30", 3, "id", "ngClass"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "datepicker-container"], ["ng-model-options", "{timezone:'utc'}", 1, "govuk-input", 3, "focusin", "focusout", "dateChange", "min", "max", "formControl", "ngxMatDatetimePicker"], ["matSuffix", "", "id", "pickerOpener", 3, "for"], [3, "yearSelected", "monthSelected", "opened", "color", "touchUi", "hideTime", "startView", "stepHour", "stepSecond", "stepMinute", "showSeconds", "showSpinners", "disableMinute", "enableMeridian"], ["mat-raised-button", "", "color", "primary", "ngxMatDatepickerApply", ""], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function DatetimePickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30542
30540
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30543
30541
|
i0.ɵɵelementStart(0, "div", 2)(1, "fieldset")(2, "legend");
|
|
@@ -30572,22 +30570,22 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
|
30572
30570
|
i0.ɵɵproperty("for", picker_r3);
|
|
30573
30571
|
i0.ɵɵadvance();
|
|
30574
30572
|
i0.ɵɵproperty("color", ctx.color)("touchUi", ctx.touchUi)("hideTime", ctx.hideTime)("startView", ctx.startView)("stepHour", ctx.stepHour)("stepSecond", ctx.stepSecond)("stepMinute", ctx.stepMinute)("showSeconds", ctx.showSeconds)("showSpinners", ctx.showSpinners)("disableMinute", ctx.disableMinute)("enableMeridian", ctx.enableMeridian);
|
|
30575
|
-
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, i4$1.
|
|
30573
|
+
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, i4$1.NgxMatDatepickerActions, i4$1.NgxMatDatepickerApply, i4$1.NgxMatDatepickerInput, i4$1.NgxMatDatetimepicker, i5.MatLegacySuffix, i6$2.MatDatepickerToggle, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], styles: [".datepicker-container{display:inline-block;position:relative;min-width:298px}.datepicker-container .govuk-input{height:35px;min-width:298px;width:auto;padding-right:40px;border:1px solid #000}.datepicker-container .govuk-input:focus{outline:1px solid #ffdd00;border:1px solid black}.datepicker-container .govuk-input::-ms-clear{display:none}.datepicker-container .datepicker-wrapper-input{position:relative;display:inline-block;top:-20%;border:0}.datepicker-container .datepicker-wrapper-input:focus{border:0;outline:none}.datepicker-container .mat-icon-button{height:32px;width:32px}.datepicker-container .mat-icon-button:focus{outline:1px solid #ffdd00}.datepicker-container .mat-icon-button .mat-datepicker-toggle-default-icon{position:relative;top:-5px}.datepicker-container .mat-datepicker-toggle{position:absolute;right:0}.datepicker-container .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:5px 0 0}.datepicker-container .mat-mdc-icon-button.mat-mdc-button-base:focus{outline:1px solid #fd0}.cdk-overlay-container .mat-datepicker-content{border:1px solid black;border-radius:0;max-width:295px;background:#fff}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table{width:calc(100% - 1px);table-layout:fixed}.cdk-overlay-container .mat-datepicker-content .mat-calendar-header{height:34px;border-bottom:1px ridge #bfc1c3}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button{left:14%;min-width:125px;border-right:1px ridge #bfc1c3;border-left:1px ridge #bfc1c3;border-radius:0;top:-20px;width:200%}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button .mat-button-wrapper{text-align:center;font-weight:700}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button:focus{border:2px solid black}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button{left:-73%;top:-20px;border:2px solid transparent;border-radius:0}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button:focus{border-color:#000}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button:after{border-left-width:5px;border-top-width:5px;color:#000;padding:4px;top:-2px;left:-2px}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button{top:-20px;left:1%;border:2px solid transparent;border-radius:0}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button:focus{border-color:#000}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button:after{border-right-width:5px;border-top-width:5px;color:#000;padding:4px;top:-2px;left:-2px}.cdk-overlay-container .mat-datepicker-content .mat-button-wrapper{text-transform:capitalize!important}.cdk-overlay-container .mat-datepicker-content .mat-calendar{border-bottom:1px solid black}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table-header-divider{padding:0;border-bottom:none}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table-header-divider:after{height:0px}.cdk-overlay-container .mat-datepicker-content .mat-calendar-content{padding:0}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-table-header{color:#000}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-table-header th{font-weight:700;font-size:15px;padding-top:2%;padding-bottom:2%;column-width:20px;text-transform:uppercase}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-label{font-weight:700;font-size:large;color:#000}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-selected{border:none;background-color:transparent;color:#fff}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-active .mat-calendar-body-today{border:none;box-shadow:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell{border:1px ridge #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell[aria-selected=true],.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell[aria-pressed=true]{background-color:#1d70b8;outline:3px solid #ffdd00;border:2px solid black;outline-offset:1px;z-index:1}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table{border-collapse:separate;border-spacing:10px}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-cell-content{border:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-selected{border:none;box-shadow:none;background-color:transparent}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell{border:1px solid #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell[aria-selected=true]{background-color:#1d70b8;outline:2px solid #ffdd00}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table{border-collapse:separate;border-spacing:20px}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table tr:nth-of-type(1){visibility:collapse}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-cell-content{border:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-selected{border:none;box-shadow:none;background-color:transparent}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell{border:1px solid #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell[aria-selected=true]{background-color:#1d70b8;outline:3px solid #ffdd00;border:2px solid black;outline-offset:1px}.cdk-overlay-container .mat-datepicker-content .time-container{padding-top:0;justify-content:flex-start;padding-left:15px}.cdk-overlay-container .mat-datepicker-content .actions{padding-bottom:20px;margin-top:20px;justify-content:flex-start}.cdk-overlay-container .mat-datepicker-content .actions .mat-button{background-color:#00823b;position:relative;display:inline-flex;align-items:center;justify-content:center;padding:.526315em 1em .263157em;border:none;border-radius:0;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px #003618;font-size:1em;line-height:1.25;text-decoration:none;-webkit-font-smoothing:antialiased;color:#fff;box-sizing:border-box;vertical-align:top;width:auto;min-width:96px;white-space:nowrap;overflow:visible;cursor:pointer}.cdk-overlay-container .mat-datepicker-content .actions .mat-button:focus{outline:2px solid #ffdd00}.cdk-overlay-container .mat-datepicker-content .actions .mat-button:hover{background-color:#006400}.cdk-overlay-container .mat-datepicker-content .actions .mat-button .mat-icon{visibility:hidden}.cdk-overlay-container .mat-datepicker-content .actions .mat-button .mat-button-wrapper:before{color:#fff;content:\"Confirm\";position:relative;font-size:15px;left:-3px}.cdk-overlay-container .mat-datepicker-content .mat-datepicker-actions{margin-top:16px;padding:8px 8px 28px;justify-content:flex-start}.cdk-overlay-container .mat-datepicker-content .mat-datepicker-actions button{background-color:#00823b;position:relative;display:inline-flex;align-items:center;justify-content:center;padding:.526315em 1em .263157em;border:none;border-radius:0;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px #003618;font-size:1em;line-height:1.25;text-decoration:none;-webkit-font-smoothing:antialiased;color:#fff;box-sizing:border-box;vertical-align:top;width:auto;min-width:96px;white-space:nowrap;overflow:visible;cursor:pointer}\n"], encapsulation: 2 });
|
|
30576
30574
|
}
|
|
30577
30575
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatetimePickerComponent, [{
|
|
30578
30576
|
type: Component,
|
|
30579
30577
|
args: [{ selector: 'ccd-datetime-picker', encapsulation: ViewEncapsulation.None, providers: [
|
|
30580
|
-
{ provide:
|
|
30578
|
+
{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MOMENT_FORMATS },
|
|
30581
30579
|
{
|
|
30582
|
-
provide:
|
|
30583
|
-
useClass:
|
|
30584
|
-
deps: [
|
|
30580
|
+
provide: DateAdapter,
|
|
30581
|
+
useClass: MomentDateAdapter,
|
|
30582
|
+
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]
|
|
30585
30583
|
},
|
|
30586
|
-
{ provide:
|
|
30584
|
+
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } }
|
|
30587
30585
|
], standalone: false, template: "<div class=\"govuk-form-group bottom-30\" [id]=\"caseField.id\"\n [ngClass]=\"{'form-group-error': dateControl && !dateControl.valid && dateControl.dirty}\">\n <fieldset>\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\"\n *ngIf=\"dateControl && dateControl.errors && dateControl.dirty && !(minError || maxError)\">{{(dateControl.errors | ccdFirstError:caseField.label)}}</span>\n <span class=\"error-message\"\n *ngIf=\"dateControl && dateControl.dirty && minError\">{{'This date is older than the minimum date allowed' | rpxTranslate}}</span>\n <span class=\"error-message\"\n *ngIf=\"dateControl && dateControl.dirty && maxError\">{{'This date is later than the maximum date allowed' | rpxTranslate}}</span>\n </legend>\n <div class=\"datepicker-container\">\n <input class=\"govuk-input\"\n #input\n attr.aria-label=\"Please enter a date and time in the format | rpxTranslate {{dateTimeEntryFormat}}\"\n [min]=\"minDate(caseField)\"\n [max]=\"maxDate(caseField)\"\n [formControl]=\"dateControl\"\n [ngxMatDatetimePicker]=\"picker\"\n (focusin)=\"focusIn()\"\n (focusout)=\"focusOut()\"\n (dateChange)=\"valueChanged()\"\n ng-model-options=\"{timezone:'utc'}\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" id=\"pickerOpener\"></mat-datepicker-toggle>\n <ngx-mat-datetime-picker #picker\n [color]=\"color\"\n [touchUi]=\"touchUi\"\n [hideTime]=\"hideTime\"\n [startView]=\"startView\"\n [stepHour]=\"stepHour\"\n [stepSecond]=\"stepSecond\"\n [stepMinute]=\"stepMinute\"\n [showSeconds]=\"showSeconds\"\n [showSpinners]=\"showSpinners\"\n [disableMinute]=\"disableMinute\"\n [enableMeridian]=\"enableMeridian\"\n (yearSelected)=\"yearSelected($event)\"\n (monthSelected)=\"monthSelected($event)\"\n (opened)=\"toggleClick()\"\n >\n <ngx-mat-datepicker-actions>\n <button mat-raised-button color=\"primary\" ngxMatDatepickerApply>Confirm</button>\n </ngx-mat-datepicker-actions>\n </ngx-mat-datetime-picker>\n </div>\n </fieldset>\n</div>\n", styles: [".datepicker-container{display:inline-block;position:relative;min-width:298px}.datepicker-container .govuk-input{height:35px;min-width:298px;width:auto;padding-right:40px;border:1px solid #000}.datepicker-container .govuk-input:focus{outline:1px solid #ffdd00;border:1px solid black}.datepicker-container .govuk-input::-ms-clear{display:none}.datepicker-container .datepicker-wrapper-input{position:relative;display:inline-block;top:-20%;border:0}.datepicker-container .datepicker-wrapper-input:focus{border:0;outline:none}.datepicker-container .mat-icon-button{height:32px;width:32px}.datepicker-container .mat-icon-button:focus{outline:1px solid #ffdd00}.datepicker-container .mat-icon-button .mat-datepicker-toggle-default-icon{position:relative;top:-5px}.datepicker-container .mat-datepicker-toggle{position:absolute;right:0}.datepicker-container .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:5px 0 0}.datepicker-container .mat-mdc-icon-button.mat-mdc-button-base:focus{outline:1px solid #fd0}.cdk-overlay-container .mat-datepicker-content{border:1px solid black;border-radius:0;max-width:295px;background:#fff}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table{width:calc(100% - 1px);table-layout:fixed}.cdk-overlay-container .mat-datepicker-content .mat-calendar-header{height:34px;border-bottom:1px ridge #bfc1c3}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button{left:14%;min-width:125px;border-right:1px ridge #bfc1c3;border-left:1px ridge #bfc1c3;border-radius:0;top:-20px;width:200%}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button .mat-button-wrapper{text-align:center;font-weight:700}.cdk-overlay-container .mat-datepicker-content .mat-calendar-period-button:focus{border:2px solid black}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button{left:-73%;top:-20px;border:2px solid transparent;border-radius:0}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button:focus{border-color:#000}.cdk-overlay-container .mat-datepicker-content .mat-calendar-previous-button:after{border-left-width:5px;border-top-width:5px;color:#000;padding:4px;top:-2px;left:-2px}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button{top:-20px;left:1%;border:2px solid transparent;border-radius:0}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button:focus{border-color:#000}.cdk-overlay-container .mat-datepicker-content .mat-calendar-next-button:after{border-right-width:5px;border-top-width:5px;color:#000;padding:4px;top:-2px;left:-2px}.cdk-overlay-container .mat-datepicker-content .mat-button-wrapper{text-transform:capitalize!important}.cdk-overlay-container .mat-datepicker-content .mat-calendar{border-bottom:1px solid black}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table-header-divider{padding:0;border-bottom:none}.cdk-overlay-container .mat-datepicker-content .mat-calendar-table-header-divider:after{height:0px}.cdk-overlay-container .mat-datepicker-content .mat-calendar-content{padding:0}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-table-header{color:#000}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-table-header th{font-weight:700;font-size:15px;padding-top:2%;padding-bottom:2%;column-width:20px;text-transform:uppercase}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-label{font-weight:700;font-size:large;color:#000}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-selected{border:none;background-color:transparent;color:#fff}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-active .mat-calendar-body-today{border:none;box-shadow:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell{border:1px ridge #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell[aria-selected=true],.cdk-overlay-container .mat-datepicker-content ngx-mat-month-view .mat-calendar-body-cell[aria-pressed=true]{background-color:#1d70b8;outline:3px solid #ffdd00;border:2px solid black;outline-offset:1px;z-index:1}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table{border-collapse:separate;border-spacing:10px}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-cell-content{border:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-selected{border:none;box-shadow:none;background-color:transparent}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell{border:1px solid #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-multi-year-view .mat-calendar-table .mat-calendar-body-cell[aria-selected=true]{background-color:#1d70b8;outline:2px solid #ffdd00}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table{border-collapse:separate;border-spacing:20px}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table tr:nth-of-type(1){visibility:collapse}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-active{background-color:#5694ca}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-cell-content{border:none}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell .mat-calendar-body-selected{border:none;box-shadow:none;background-color:transparent}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell{border:1px solid #bfc1c3}.cdk-overlay-container .mat-datepicker-content ngx-mat-year-view .mat-calendar-table .mat-calendar-body-cell[aria-selected=true]{background-color:#1d70b8;outline:3px solid #ffdd00;border:2px solid black;outline-offset:1px}.cdk-overlay-container .mat-datepicker-content .time-container{padding-top:0;justify-content:flex-start;padding-left:15px}.cdk-overlay-container .mat-datepicker-content .actions{padding-bottom:20px;margin-top:20px;justify-content:flex-start}.cdk-overlay-container .mat-datepicker-content .actions .mat-button{background-color:#00823b;position:relative;display:inline-flex;align-items:center;justify-content:center;padding:.526315em 1em .263157em;border:none;border-radius:0;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px #003618;font-size:1em;line-height:1.25;text-decoration:none;-webkit-font-smoothing:antialiased;color:#fff;box-sizing:border-box;vertical-align:top;width:auto;min-width:96px;white-space:nowrap;overflow:visible;cursor:pointer}.cdk-overlay-container .mat-datepicker-content .actions .mat-button:focus{outline:2px solid #ffdd00}.cdk-overlay-container .mat-datepicker-content .actions .mat-button:hover{background-color:#006400}.cdk-overlay-container .mat-datepicker-content .actions .mat-button .mat-icon{visibility:hidden}.cdk-overlay-container .mat-datepicker-content .actions .mat-button .mat-button-wrapper:before{color:#fff;content:\"Confirm\";position:relative;font-size:15px;left:-3px}.cdk-overlay-container .mat-datepicker-content .mat-datepicker-actions{margin-top:16px;padding:8px 8px 28px;justify-content:flex-start}.cdk-overlay-container .mat-datepicker-content .mat-datepicker-actions button{background-color:#00823b;position:relative;display:inline-flex;align-items:center;justify-content:center;padding:.526315em 1em .263157em;border:none;border-radius:0;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px #003618;font-size:1em;line-height:1.25;text-decoration:none;-webkit-font-smoothing:antialiased;color:#fff;box-sizing:border-box;vertical-align:top;width:auto;min-width:96px;white-space:nowrap;overflow:visible;cursor:pointer}\n"] }]
|
|
30588
30586
|
}], () => [{ type: FormatTranslatorService }, { type: undefined, decorators: [{
|
|
30589
30587
|
type: Inject,
|
|
30590
|
-
args: [
|
|
30588
|
+
args: [MAT_DATE_FORMATS]
|
|
30591
30589
|
}] }], { datetimePicker: [{
|
|
30592
30590
|
type: ViewChild,
|
|
30593
30591
|
args: ['picker', { static: false }]
|
|
@@ -30597,7 +30595,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
|
30597
30595
|
}], dateControl: [{
|
|
30598
30596
|
type: Input
|
|
30599
30597
|
}] }); })();
|
|
30600
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DatetimePickerComponent, { className: "DatetimePickerComponent", filePath: "lib/shared/components/palette/datetime-picker/datetime-picker.component.ts", lineNumber:
|
|
30598
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DatetimePickerComponent, { className: "DatetimePickerComponent", filePath: "lib/shared/components/palette/datetime-picker/datetime-picker.component.ts", lineNumber: 31 }); })();
|
|
30601
30599
|
|
|
30602
30600
|
class DocumentUrlPipe {
|
|
30603
30601
|
appConfig;
|
|
@@ -32209,9 +32207,8 @@ class PaletteModule {
|
|
|
32209
32207
|
LabelSubstitutorModule,
|
|
32210
32208
|
TranslatedMarkdownModule,
|
|
32211
32209
|
MarkdownModule.forChild(),
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
NgxMatNativeDateModule,
|
|
32210
|
+
NgxMatDatepickerActions,
|
|
32211
|
+
NgxMatDatetimepicker,
|
|
32215
32212
|
MatLegacyFormFieldModule,
|
|
32216
32213
|
MatLegacyInputModule,
|
|
32217
32214
|
MatDatepickerModule,
|
|
@@ -32226,10 +32223,7 @@ class PaletteModule {
|
|
|
32226
32223
|
MediaViewerModule,
|
|
32227
32224
|
LoadingModule,
|
|
32228
32225
|
MarkdownComponentModule,
|
|
32229
|
-
ErrorsModule,
|
|
32230
|
-
NgxMatNativeDateModule,
|
|
32231
|
-
NgxMatTimepickerModule,
|
|
32232
|
-
TabsModule,
|
|
32226
|
+
ErrorsModule, TabsModule,
|
|
32233
32227
|
PaletteUtilsModule,
|
|
32234
32228
|
PipesModule,
|
|
32235
32229
|
MarkdownComponentModule] });
|
|
@@ -32254,9 +32248,10 @@ class PaletteModule {
|
|
|
32254
32248
|
LabelSubstitutorModule,
|
|
32255
32249
|
TranslatedMarkdownModule,
|
|
32256
32250
|
MarkdownModule.forChild(),
|
|
32257
|
-
|
|
32258
|
-
|
|
32259
|
-
|
|
32251
|
+
NgxMatDatepickerActions,
|
|
32252
|
+
NgxMatDatepickerApply,
|
|
32253
|
+
NgxMatDatepickerInput,
|
|
32254
|
+
NgxMatDatetimepicker,
|
|
32260
32255
|
MatLegacyFormFieldModule,
|
|
32261
32256
|
MatLegacyInputModule,
|
|
32262
32257
|
MatDatepickerModule,
|
|
@@ -32286,9 +32281,10 @@ class PaletteModule {
|
|
|
32286
32281
|
...PALETTE_COMPONENTS
|
|
32287
32282
|
],
|
|
32288
32283
|
exports: [
|
|
32289
|
-
|
|
32290
|
-
|
|
32291
|
-
|
|
32284
|
+
NgxMatDatepickerActions,
|
|
32285
|
+
NgxMatDatepickerApply,
|
|
32286
|
+
NgxMatDatepickerInput,
|
|
32287
|
+
NgxMatDatetimepicker,
|
|
32292
32288
|
TabsModule,
|
|
32293
32289
|
PaletteUtilsModule,
|
|
32294
32290
|
PipesModule,
|
|
@@ -32463,9 +32459,10 @@ class PaletteModule {
|
|
|
32463
32459
|
FormModule,
|
|
32464
32460
|
TabsModule,
|
|
32465
32461
|
LabelSubstitutorModule,
|
|
32466
|
-
TranslatedMarkdownModule, i1$4.MarkdownModule,
|
|
32467
|
-
|
|
32468
|
-
|
|
32462
|
+
TranslatedMarkdownModule, i1$4.MarkdownModule, NgxMatDatepickerActions,
|
|
32463
|
+
NgxMatDatepickerApply,
|
|
32464
|
+
NgxMatDatepickerInput,
|
|
32465
|
+
NgxMatDatetimepicker,
|
|
32469
32466
|
MatLegacyFormFieldModule,
|
|
32470
32467
|
MatLegacyInputModule,
|
|
32471
32468
|
MatDatepickerModule,
|
|
@@ -32478,9 +32475,10 @@ class PaletteModule {
|
|
|
32478
32475
|
MediaViewerModule,
|
|
32479
32476
|
LoadingModule,
|
|
32480
32477
|
MarkdownComponentModule,
|
|
32481
|
-
ErrorsModule], exports: [
|
|
32482
|
-
|
|
32483
|
-
|
|
32478
|
+
ErrorsModule], exports: [NgxMatDatepickerActions,
|
|
32479
|
+
NgxMatDatepickerApply,
|
|
32480
|
+
NgxMatDatepickerInput,
|
|
32481
|
+
NgxMatDatetimepicker,
|
|
32484
32482
|
TabsModule,
|
|
32485
32483
|
PaletteUtilsModule,
|
|
32486
32484
|
PipesModule,
|
|
@@ -37837,9 +37835,12 @@ class TaskAssignedComponent {
|
|
|
37837
37835
|
// Current user is a caseworker?
|
|
37838
37836
|
this.jurisdiction = this.task.jurisdiction;
|
|
37839
37837
|
this.caseType = this.task.case_type_id;
|
|
37840
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
37841
|
-
if (
|
|
37842
|
-
|
|
37838
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(this.task.jurisdiction).subscribe(result => {
|
|
37839
|
+
if (result && result[0].service === this.task.jurisdiction && result[0].caseworkers) {
|
|
37840
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === this.task.assignee);
|
|
37841
|
+
if (caseworker) {
|
|
37842
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
37843
|
+
}
|
|
37843
37844
|
}
|
|
37844
37845
|
if (!this.assignedUserName) {
|
|
37845
37846
|
// Current user is a judicial user?
|