@unipin/angular-applet 18.3.6 → 18.4.0

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, Attribute, HostBinding, PlatformRef, VERSION, enableProdMode, NgZone, Injectable, Inject, Directive, inject, NgModule, HostListener, Pipe, ContentChildren } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
- import { CommonModule, Location, formatDate } from '@angular/common';
4
+ import { CommonModule, Location, formatDate, DatePipe, JsonPipe } from '@angular/common';
5
5
  import * as i1 from '@ionic/angular';
6
6
  import { IonButton, IonicModule, NavController } from '@ionic/angular';
7
7
  import * as i1$2 from '@angular/router';
@@ -660,6 +660,11 @@ class FormDateComponent {
660
660
  registerOnTouched(fn) { this.onTouched = fn; }
661
661
  writeValue(val) {
662
662
  this.value = val;
663
+ if (!val) {
664
+ this.ch.markForCheck();
665
+ return;
666
+ }
667
+ ;
663
668
  let localTime = new Date(val);
664
669
  localTime = new Date(localTime.getTime() - (localTime.getTimezoneOffset() * 60000));
665
670
  this.localValue = localTime.toISOString();
@@ -1463,6 +1468,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImpor
1463
1468
  type: Output
1464
1469
  }] } });
1465
1470
 
1471
+ var ActivityHistoryType;
1472
+ (function (ActivityHistoryType) {
1473
+ ActivityHistoryType["AttachmentAdd"] = "ATTACHMENT_ADD";
1474
+ ActivityHistoryType["AttachmentRemove"] = "ATTACHMENT_REMOVE";
1475
+ ActivityHistoryType["BoardIn"] = "BOARD_IN";
1476
+ ActivityHistoryType["BoardOut"] = "BOARD_OUT";
1477
+ ActivityHistoryType["CardMove"] = "CARD_MOVE";
1478
+ ActivityHistoryType["CommentAdd"] = "COMMENT_ADD";
1479
+ ActivityHistoryType["CommentEdit"] = "COMMENT_EDIT";
1480
+ ActivityHistoryType["CommentRemove"] = "COMMENT_REMOVE";
1481
+ })(ActivityHistoryType || (ActivityHistoryType = {}));
1466
1482
  var AggregationTypeEnum;
1467
1483
  (function (AggregationTypeEnum) {
1468
1484
  AggregationTypeEnum["CountValue"] = "COUNT_VALUE";
@@ -1770,6 +1786,11 @@ var PaymentChannelTargetType;
1770
1786
  PaymentChannelTargetType["Exclude"] = "EXCLUDE";
1771
1787
  PaymentChannelTargetType["Include"] = "INCLUDE";
1772
1788
  })(PaymentChannelTargetType || (PaymentChannelTargetType = {}));
1789
+ var PaymentProviderSortByEnum;
1790
+ (function (PaymentProviderSortByEnum) {
1791
+ PaymentProviderSortByEnum["CreatedAt"] = "createdAt";
1792
+ PaymentProviderSortByEnum["UpdatedAt"] = "updatedAt";
1793
+ })(PaymentProviderSortByEnum || (PaymentProviderSortByEnum = {}));
1773
1794
  var PaymentTxnResponseStatusEnum;
1774
1795
  (function (PaymentTxnResponseStatusEnum) {
1775
1796
  PaymentTxnResponseStatusEnum["CanceledByCustomer"] = "CANCELED_BY_CUSTOMER";
@@ -1912,6 +1933,7 @@ var Status;
1912
1933
  Status["Expired"] = "EXPIRED";
1913
1934
  Status["Inactive"] = "INACTIVE";
1914
1935
  Status["Pending"] = "PENDING";
1936
+ Status["VerseData"] = "VERSE_DATA";
1915
1937
  })(Status || (Status = {}));
1916
1938
  var SuggestedAction;
1917
1939
  (function (SuggestedAction) {
@@ -1987,6 +2009,12 @@ var VoucherAction;
1987
2009
  VoucherAction["Redeem"] = "REDEEM";
1988
2010
  VoucherAction["Void"] = "VOID";
1989
2011
  })(VoucherAction || (VoucherAction = {}));
2012
+ var VoucherAutoGenStatus;
2013
+ (function (VoucherAutoGenStatus) {
2014
+ VoucherAutoGenStatus["Active"] = "ACTIVE";
2015
+ VoucherAutoGenStatus["Deleted"] = "DELETED";
2016
+ VoucherAutoGenStatus["Disable"] = "DISABLE";
2017
+ })(VoucherAutoGenStatus || (VoucherAutoGenStatus = {}));
1990
2018
  var VoucherGroupType;
1991
2019
  (function (VoucherGroupType) {
1992
2020
  VoucherGroupType["Api"] = "API";
@@ -2007,6 +2035,7 @@ var WebtopupTxnReloadTypeEnum;
2007
2035
  WebtopupTxnReloadTypeEnum["Na"] = "NA";
2008
2036
  WebtopupTxnReloadTypeEnum["Uc"] = "UC";
2009
2037
  WebtopupTxnReloadTypeEnum["Up"] = "UP";
2038
+ WebtopupTxnReloadTypeEnum["Voucher"] = "VOUCHER";
2010
2039
  })(WebtopupTxnReloadTypeEnum || (WebtopupTxnReloadTypeEnum = {}));
2011
2040
 
2012
2041
  class ProfileService {
@@ -3307,7 +3336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImpor
3307
3336
  class ApprovalService {
3308
3337
  constructor(apollo) {
3309
3338
  this.apollo = apollo;
3310
- this.baseAttr = `guid createdAt entity remark sourcePlatform status type`;
3339
+ this.baseAttr = `guid createdAt entity remark sourcePlatform status type approvalGroup { guid }`;
3311
3340
  }
3312
3341
  query(input, extraAttr = '', fetchPolicy) {
3313
3342
  return this.apollo.query({
@@ -3356,7 +3385,7 @@ class ApprovalListComponent {
3356
3385
  this.gridConfig = {
3357
3386
  noRowText: 'Approval not found',
3358
3387
  colDefs: [
3359
- { headerName: 'Entity', field: 'entity', checkboxSelection: true },
3388
+ { headerName: 'Entity', field: 'entity', checkboxSelection: ({ data: { approvalGroup } }) => this.isCheckboxSelectable(approvalGroup) },
3360
3389
  { headerName: 'Remark', field: 'remark' },
3361
3390
  { headerName: 'Source Platform', field: 'sourcePlatform' },
3362
3391
  { headerName: 'Status', field: 'status', maxWidth: 100, cellRenderer: ({ value }) => value ? `<div class="badge m-auto bg-${value === ApprovalStatusEnum.Pending ? 'warning' : value === ApprovalStatusEnum.Approved ? 'success' : 'danger'}">${value}</div>` : '' },
@@ -3402,7 +3431,10 @@ class ApprovalListComponent {
3402
3431
  this.router.navigate([`/approval/${guid}`], { preserveFragment: true });
3403
3432
  }
3404
3433
  selectApprovals() {
3405
- this.btnConfig[0].disabled = this.btnConfig[1].disabled = this.gridApi.getSelectedRows().length <= 1;
3434
+ const dataGrid = this.gridApi.getSelectedRows();
3435
+ this.btnConfig[0].disabled = this.btnConfig[1].disabled = dataGrid.length < 1;
3436
+ this.selectedApprovalGroupGuid = dataGrid.length === 0 ? undefined : dataGrid[0].approvalGroup.guid;
3437
+ this.gridApi.refreshCells({ force: true });
3406
3438
  }
3407
3439
  search({ data }) {
3408
3440
  this.input.type = data?.type;
@@ -3410,13 +3442,21 @@ class ApprovalListComponent {
3410
3442
  this.gridApi.getSelectedNodes().forEach((e) => e.setSelected(false));
3411
3443
  this.gridApi.refreshInfiniteCache();
3412
3444
  }
3445
+ isCheckboxSelectable(approvalGroup) {
3446
+ if (!approvalGroup)
3447
+ return false;
3448
+ if (approvalGroup.guid === this.selectedApprovalGroupGuid)
3449
+ return true;
3450
+ return true;
3451
+ }
3413
3452
  multipleApproval(btn) {
3414
3453
  btn.toggleLoading();
3415
3454
  this.router.navigate([`/approval/approval-group`], {
3416
3455
  preserveFragment: true,
3417
3456
  queryParams: {
3418
3457
  isApprove: btn.color !== 'danger',
3419
- guids: this.gridApi.getSelectedRows().map(({ guid }) => guid),
3458
+ approvalGroupGuid: this.selectedApprovalGroupGuid,
3459
+ guids: this.gridApi.getSelectedRows().map(({ guid }) => guid)
3420
3460
  }
3421
3461
  });
3422
3462
  }
@@ -3449,10 +3489,14 @@ class ApprovalFormComponent {
3449
3489
  this.btnConfig = [];
3450
3490
  this.data = [];
3451
3491
  }
3452
- ngOnDestroy() { this.sub?.unsubscribe(); }
3453
- setGuid(guids, isApprove) {
3454
- if (guids.length === 1)
3455
- this.guid = guids[0];
3492
+ ngOnDestroy() {
3493
+ this.sub?.unsubscribe();
3494
+ }
3495
+ setGuid(guids, approvalGroupGuid, isApprove) {
3496
+ this.guids = guids;
3497
+ if (approvalGroupGuid) {
3498
+ this.approvalGroupGuid = approvalGroupGuid;
3499
+ }
3456
3500
  this.btnConfig.length = 0;
3457
3501
  this.setLoading(true);
3458
3502
  this.sub = this.service.query({ guids, status: [ApprovalStatusEnum.Approved, ApprovalStatusEnum.Declined, ApprovalStatusEnum.Pending] }, 'data permission reason').subscribe({
@@ -3462,19 +3506,7 @@ class ApprovalFormComponent {
3462
3506
  return;
3463
3507
  }
3464
3508
  this.data = data;
3465
- if (data.length > 1) {
3466
- let dataCount = 0;
3467
- data.map(({ permission, status }) => {
3468
- if (status === ApprovalStatusEnum.Pending) {
3469
- const perm = permission.split('.');
3470
- if (this.permService.checkPermission(perm[0], perm[1], perm[2]))
3471
- dataCount++;
3472
- if (dataCount === data.length)
3473
- isApprove ? this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval(s)', disabled: false, onClick: this.request.bind(this) }) : this.btnConfig.push({ label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
3474
- }
3475
- });
3476
- }
3477
- else {
3509
+ if (data.length === 1) {
3478
3510
  const { status, permission } = data[0];
3479
3511
  if (status === ApprovalStatusEnum.Pending) {
3480
3512
  const perm = permission.split('.');
@@ -3483,6 +3515,25 @@ class ApprovalFormComponent {
3483
3515
  }
3484
3516
  }
3485
3517
  }
3518
+ else {
3519
+ let dataCount = 0;
3520
+ data.map(({ permission, status }) => {
3521
+ if (status === ApprovalStatusEnum.Pending) {
3522
+ const perm = permission.split('.');
3523
+ if (this.permService.checkPermission(perm[0], perm[1], perm[2])) {
3524
+ dataCount++;
3525
+ }
3526
+ if (dataCount === data.length) {
3527
+ if (isApprove) {
3528
+ this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval(s)', disabled: false, onClick: this.request.bind(this) });
3529
+ }
3530
+ else {
3531
+ this.btnConfig.push({ label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
3532
+ }
3533
+ }
3534
+ }
3535
+ });
3536
+ }
3486
3537
  this.setLoading(false);
3487
3538
  },
3488
3539
  error: ({ message }) => {
@@ -3499,12 +3550,15 @@ class ApprovalFormComponent {
3499
3550
  text: `${isApprove ? 'Approve' : 'Decline'}`,
3500
3551
  handler: ({ reason }) => {
3501
3552
  this.sub?.unsubscribe();
3502
- const variables = {
3503
- ...(this.guid ? { guid: this.guid } : { approvalGroupGuid: '' }),
3553
+ const input = {
3554
+ reason,
3504
3555
  isApprove,
3505
- reason
3556
+ guids: this.guids,
3506
3557
  };
3507
- this.sub = this.service.request(variables).subscribe({
3558
+ if (this.approvalGroupGuid) {
3559
+ input.approvalGroupGuid = this.approvalGroupGuid;
3560
+ }
3561
+ this.sub = this.service.request(input).subscribe({
3508
3562
  next: () => {
3509
3563
  this.showAlert('Success', `Approval ${isApprove ? 'approved' : 'declined'}`);
3510
3564
  this.router.navigateByUrl('approval');
@@ -3525,18 +3579,19 @@ class ApprovalFormComponent {
3525
3579
  }
3526
3580
  async showAlert(header, message, buttons = ['OK'], inputs = []) { (await this.alertCtrl.create({ header, message, buttons, inputs })).present(); }
3527
3581
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: ApprovalFormComponent, deps: [{ token: i1$2.Router }, { token: i0.ChangeDetectorRef }, { token: ApprovalService }, { token: GridService }, { token: i1.AlertController }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
3528
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.4", type: ApprovalFormComponent, isStandalone: true, selector: "up-approval-form", inputs: { isLoading: "isLoading" }, host: { classAttribute: "px-4 pb-4 d-block" }, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea label=\"JSON\" [disabled]=\"true\" [value]=\"d.data | json\" />\n <up-textarea class=\"mt-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n \n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 sk-input\" />\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3582
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.4", type: ApprovalFormComponent, isStandalone: true, selector: "up-approval-form", inputs: { isLoading: "isLoading" }, host: { classAttribute: "px-4 pb-4 d-block" }, ngImport: i0, template: "@if (isLoading) {\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n \n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 sk-input\" />\n}\n@else {\n @for (d of data; track $index) {\n @if (data.length > 1) {\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ $index + 1 }}</h5>\n </div>\n }\n \n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea label=\"JSON\" [disabled]=\"true\" [value]=\"d.data | json\" />\n <up-textarea class=\"mt-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n }\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3529
3583
  }
3530
3584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: ApprovalFormComponent, decorators: [{
3531
3585
  type: Component,
3532
3586
  args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
3533
3587
  class: 'px-4 pb-4 d-block'
3534
3588
  }, imports: [
3589
+ DatePipe,
3590
+ JsonPipe,
3535
3591
  IonicModule,
3536
- CommonModule,
3537
3592
  FormInputComponent,
3538
3593
  FormTextareaComponent
3539
- ], template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea label=\"JSON\" [disabled]=\"true\" [value]=\"d.data | json\" />\n <up-textarea class=\"mt-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n \n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 sk-input\" />\n</ng-template>\n" }]
3594
+ ], template: "@if (isLoading) {\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n \n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 sk-input\" />\n}\n@else {\n @for (d of data; track $index) {\n @if (data.length > 1) {\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ $index + 1 }}</h5>\n </div>\n }\n \n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea label=\"JSON\" [disabled]=\"true\" [value]=\"d.data | json\" />\n <up-textarea class=\"mt-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n }\n}\n" }]
3540
3595
  }], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: ApprovalService }, { type: GridService }, { type: i1.AlertController }, { type: PermissionService }], propDecorators: { isLoading: [{
3541
3596
  type: Input
3542
3597
  }] } });
@@ -3553,12 +3608,13 @@ class ApprovalDetailComponent {
3553
3608
  if (params) {
3554
3609
  this.guids = params['guids'];
3555
3610
  this.isApprove = params['isApprove'] === 'true';
3611
+ this.approvalGroupGuid = params['approvalGroupGuid'];
3556
3612
  }
3557
3613
  });
3558
3614
  }
3559
3615
  ngAfterViewInit() {
3560
3616
  if (this.guids) {
3561
- this.setChildGuid('');
3617
+ this.setChildGuid(this.guids);
3562
3618
  this.changeTab(this.activatedRoute.snapshot.fragment);
3563
3619
  }
3564
3620
  else {
@@ -3569,7 +3625,7 @@ class ApprovalDetailComponent {
3569
3625
  const newGuid = this.activatedRoute.children[0].snapshot.params['guid'];
3570
3626
  if (this.guid !== newGuid) {
3571
3627
  this.guid = newGuid;
3572
- this.setChildGuid(this.guid);
3628
+ this.setChildGuid([this.guid]);
3573
3629
  }
3574
3630
  }
3575
3631
  });
@@ -3584,11 +3640,11 @@ class ApprovalDetailComponent {
3584
3640
  this.btnConfig = this.formComponent?.btnConfig ?? [];
3585
3641
  }
3586
3642
  }
3587
- setChildGuid(guid) {
3588
- this.formComponent?.setGuid(this.guids ?? [guid], this.isApprove);
3643
+ setChildGuid(guids) {
3644
+ this.formComponent?.setGuid(guids, this.approvalGroupGuid, this.isApprove);
3589
3645
  }
3590
3646
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: ApprovalDetailComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
3591
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.4", type: ApprovalDetailComponent, isStandalone: true, selector: "up-approval-detail", host: { classAttribute: "d-block h-100" }, viewQueries: [{ propertyName: "formComponent", first: true, predicate: ApprovalFormComponent, descendants: true }], ngImport: i0, template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"approval-detail-button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" button />\n\n <ng-template #loading>\n <ion-skeleton-text class=\"m-0 sk-btn\" button />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: ColumnHeaderContainerComponent, selector: "up-column-header-container", inputs: ["header", "prevUrl"] }, { kind: "component", type: ApprovalFormComponent, selector: "up-approval-form", inputs: ["isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3647
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.4", type: ApprovalDetailComponent, isStandalone: true, selector: "up-approval-detail", host: { classAttribute: "d-block h-100" }, viewQueries: [{ propertyName: "formComponent", first: true, predicate: ApprovalFormComponent, descendants: true }], ngImport: i0, template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n @if (!formComponent?.isLoading) {\n <up-btn-group id=\"approval-detail-button\" [config]=\"btnConfig\" button />\n }\n @else {\n <ion-skeleton-text class=\"m-0 sk-btn\" button />\n }\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: ColumnHeaderContainerComponent, selector: "up-column-header-container", inputs: ["header", "prevUrl"] }, { kind: "component", type: ApprovalFormComponent, selector: "up-approval-form", inputs: ["isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3592
3648
  }
3593
3649
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: ApprovalDetailComponent, decorators: [{
3594
3650
  type: Component,
@@ -3596,12 +3652,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImpor
3596
3652
  class: 'd-block h-100'
3597
3653
  }, imports: [
3598
3654
  IonicModule,
3599
- CommonModule,
3600
3655
  TabsComponentModule,
3601
3656
  ButtonGroupComponent,
3602
3657
  ColumnHeaderContainerComponent,
3603
3658
  ApprovalFormComponent
3604
- ], template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"approval-detail-button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" button />\n\n <ng-template #loading>\n <ion-skeleton-text class=\"m-0 sk-btn\" button />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n" }]
3659
+ ], template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n @if (!formComponent?.isLoading) {\n <up-btn-group id=\"approval-detail-button\" [config]=\"btnConfig\" button />\n }\n @else {\n <ion-skeleton-text class=\"m-0 sk-btn\" button />\n }\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n" }]
3605
3660
  }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { formComponent: [{
3606
3661
  type: ViewChild,
3607
3662
  args: [ApprovalFormComponent]