@hmcts/ccd-case-ui-toolkit 7.0.60 → 7.0.61

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.
@@ -8948,7 +8948,7 @@ class WorkAllocationService {
8948
8948
  isWAEnabled(jurisdiction, caseType) {
8949
8949
  this.features = this.appConfig.getWAServiceConfig();
8950
8950
  const ftstr = JSON.stringify(this.features);
8951
- console.log(`isWAEnabled: ${ftstr}`);
8951
+ this.appConfig.logMessage(`isWAEnabled: wa-service-config returning ${ftstr.length > 0}`);
8952
8952
  let enabled = false;
8953
8953
  if (!jurisdiction || !caseType) {
8954
8954
  const caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
@@ -8956,7 +8956,7 @@ class WorkAllocationService {
8956
8956
  caseType = caseInfo.caseType;
8957
8957
  }
8958
8958
  if (!this.features || !this.features.configurations) {
8959
- console.log('isWAEnabled: no features');
8959
+ this.appConfig.logMessage('isWAEnabled: no features');
8960
8960
  return false;
8961
8961
  }
8962
8962
  this.features.configurations.forEach(serviceConfig => {
@@ -8964,7 +8964,7 @@ class WorkAllocationService {
8964
8964
  enabled = true;
8965
8965
  }
8966
8966
  });
8967
- console.log(`isWAEnabled: returning ${enabled}`);
8967
+ this.appConfig.logMessage(`isWAEnabled: returning ${enabled}`);
8968
8968
  return enabled;
8969
8969
  }
8970
8970
  /**
@@ -8992,7 +8992,7 @@ class WorkAllocationService {
8992
8992
  if (!this.isWAEnabled()) {
8993
8993
  return of(null);
8994
8994
  }
8995
- console.log(`completeTask: completing ${taskId}`);
8995
+ this.appConfig.logMessage(`completeTask: completing ${taskId}`);
8996
8996
  const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
8997
8997
  return this.http
8998
8998
  .post(url, { actionByEvent: true, eventName: eventName })
@@ -9013,6 +9013,7 @@ class WorkAllocationService {
9013
9013
  if (!this.isWAEnabled()) {
9014
9014
  return of(null);
9015
9015
  }
9016
+ this.appConfig.logMessage(`assignAndCompleteTask: completing ${taskId}`);
9016
9017
  const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
9017
9018
  return this.http
9018
9019
  .post(url, {
@@ -9100,6 +9101,7 @@ class WorkAllocationService {
9100
9101
  tasks: []
9101
9102
  };
9102
9103
  if (!this.isWAEnabled()) {
9104
+ this.appConfig.logMessage(`isWAEnabled false for ${caseId} in event ${eventId}`);
9103
9105
  return of(defaultPayload);
9104
9106
  }
9105
9107
  return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/case/tasks/${caseId}/event/${eventId}/caseType/${caseType}/jurisdiction/${jurisdiction}`);
@@ -9111,6 +9113,7 @@ class WorkAllocationService {
9111
9113
  if (!this.isWAEnabled()) {
9112
9114
  return of({ task: null });
9113
9115
  }
9116
+ this.appConfig.logMessage(`getTask: ${taskId}`);
9114
9117
  return this.http.get(`${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}`);
9115
9118
  }
9116
9119
  static ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(AlertService), i0.ɵɵinject(SessionStorageService)); };
@@ -9173,6 +9176,7 @@ class CaseEditComponent {
9173
9176
  validPageListCaseFieldsService;
9174
9177
  workAllocationService;
9175
9178
  alertService;
9179
+ abstractConfig;
9176
9180
  static ORIGIN_QUERY_PARAM = 'origin';
9177
9181
  static ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
9178
9182
  eventTrigger;
@@ -9198,7 +9202,7 @@ class CaseEditComponent {
9198
9202
  error;
9199
9203
  callbackErrorsSubject = new Subject();
9200
9204
  validPageList = [];
9201
- constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService) {
9205
+ constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig) {
9202
9206
  this.fb = fb;
9203
9207
  this.caseNotifier = caseNotifier;
9204
9208
  this.router = router;
@@ -9215,6 +9219,7 @@ class CaseEditComponent {
9215
9219
  this.validPageListCaseFieldsService = validPageListCaseFieldsService;
9216
9220
  this.workAllocationService = workAllocationService;
9217
9221
  this.alertService = alertService;
9222
+ this.abstractConfig = abstractConfig;
9218
9223
  }
9219
9224
  ngOnInit() {
9220
9225
  this.wizard = this.wizardFactory.create(this.eventTrigger);
@@ -9338,6 +9343,7 @@ class CaseEditComponent {
9338
9343
  const eventId = this.getEventId(form);
9339
9344
  const caseId = this.getCaseId(caseDetails);
9340
9345
  if (this.taskExistsForThisEventAndCase(taskInSessionStorage, taskEventInSessionStorage, eventId, caseId)) {
9346
+ this.abstractConfig.logMessage(`task exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9341
9347
  // Show event completion component to perform event completion checks
9342
9348
  this.eventCompletionParams = ({
9343
9349
  caseId,
@@ -9545,10 +9551,12 @@ class CaseEditComponent {
9545
9551
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9546
9552
  if (taskStr && assignNeeded) {
9547
9553
  const task = JSON.parse(taskStr);
9554
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired with assignNeeded: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9548
9555
  return this.workAllocationService.assignAndCompleteTask(task.id, this.eventTrigger.name);
9549
9556
  }
9550
9557
  else if (taskStr) {
9551
9558
  const task = JSON.parse(taskStr);
9559
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9552
9560
  return this.workAllocationService.completeTask(task.id, this.eventTrigger.name);
9553
9561
  }
9554
9562
  return of(true);
@@ -9608,7 +9616,7 @@ class CaseEditComponent {
9608
9616
  hasCallbackFailed(response) {
9609
9617
  return response['callback_response_status'] !== 'CALLBACK_COMPLETED';
9610
9618
  }
9611
- static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
9619
+ static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
9612
9620
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9613
9621
  i0.ɵɵelement(0, "router-outlet");
9614
9622
  } }, dependencies: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
@@ -9616,7 +9624,7 @@ class CaseEditComponent {
9616
9624
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
9617
9625
  type: Component,
9618
9626
  args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], template: "<router-outlet></router-outlet>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
9619
- }], () => [{ type: i4.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }], { eventTrigger: [{
9627
+ }], () => [{ type: i4.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }, { type: AbstractAppConfig }], { eventTrigger: [{
9620
9628
  type: Input
9621
9629
  }], submit: [{
9622
9630
  type: Input
@@ -9631,7 +9639,7 @@ class CaseEditComponent {
9631
9639
  }], submitted: [{
9632
9640
  type: Output
9633
9641
  }] }); })();
9634
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 33 }); })();
9642
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 34 }); })();
9635
9643
 
9636
9644
  function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
9637
9645
  i0.ɵɵelement(0, "div");