@isaiahiroko/tilmart-ngx-apps-admin 0.2.12 → 0.2.13
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.
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-sbSJXda_.mjs +92 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-sbSJXda_.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-EooAWVy_.mjs +73 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-EooAWVy_.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-DrKEqPkW.mjs +605 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-DrKEqPkW.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-u5VyaNWX.mjs +97 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-u5VyaNWX.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs → isaiahiroko-tilmart-ngx-apps-admin-claims.module-CLtalsnJ.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-CLtalsnJ.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-BCkLIQta.mjs +88 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-BCkLIQta.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs → isaiahiroko-tilmart-ngx-apps-admin-customers.module-BohEH2SB.mjs} +2 -2
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-customers.module-BohEH2SB.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-z6apTF3A.mjs +86 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-z6apTF3A.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-TryMzSXT.mjs → isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-Dnh9hEz_.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-Dnh9hEz_.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-json-builder.component-BFroIYk9.mjs +1579 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-json-builder.component-BFroIYk9.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs → isaiahiroko-tilmart-ngx-apps-admin-list-page.base-ChfiBo_X.mjs} +29 -5
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-ChfiBo_X.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-aIW0jRhm.mjs +239 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-aIW0jRhm.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-overview.module-C6gjcJ84.mjs +105 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-overview.module-C6gjcJ84.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs → isaiahiroko-tilmart-ngx-apps-admin-payments.module-Bej9cdwM.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-Bej9cdwM.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-Dh7PTGG7.mjs +88 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-Dh7PTGG7.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-B8gaByYE.mjs +81 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-B8gaByYE.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs → isaiahiroko-tilmart-ngx-apps-admin-referrals.module-7OLTrySw.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-7OLTrySw.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-reports.module-fjoFzY6t.mjs +137 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-reports.module-fjoFzY6t.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs → isaiahiroko-tilmart-ngx-apps-admin-returns.module-D0RKEzAr.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-D0RKEzAr.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BWZ9OBPH.mjs +84 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BWZ9OBPH.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-settings.module-D8HLxbUb.mjs → isaiahiroko-tilmart-ngx-apps-admin-settings.module-DZWUhyJg.mjs} +14 -7
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-DZWUhyJg.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-shipments.module-CWXgE2E_.mjs → isaiahiroko-tilmart-ngx-apps-admin-shipments.module-BG9DCmG-.mjs} +3 -3
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-BG9DCmG-.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-staff.module-YjJJe00X.mjs → isaiahiroko-tilmart-ngx-apps-admin-staff.module-Br80U5_k.mjs} +2 -2
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-staff.module-YjJJe00X.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-staff.module-Br80U5_k.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-status-badge-AXfNPKaS.mjs +66 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-status-badge-AXfNPKaS.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-BFbm7118.mjs +178 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-BFbm7118.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs → isaiahiroko-tilmart-ngx-apps-admin-users.module-C8nNzJ5X.mjs} +2 -2
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-users.module-C8nNzJ5X.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs +56 -46
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs.map +1 -1
- package/package.json +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-ClIiV2uK.mjs +0 -76
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-ClIiV2uK.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-CSp0tWes.mjs +0 -70
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-CSp0tWes.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-BwjfFXDU.mjs +0 -562
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-BwjfFXDU.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-uKkUREjb.mjs +0 -94
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-uKkUREjb.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-Dcu1nJBW.mjs +0 -85
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-Dcu1nJBW.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-DF7iSJaN.mjs +0 -83
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-DF7iSJaN.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-TryMzSXT.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-vldWwcAr.mjs +0 -190
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-vldWwcAr.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-BO4zRytg.mjs +0 -94
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-BO4zRytg.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-D8H6ujoy.mjs +0 -78
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-D8H6ujoy.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs +0 -104
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-fYKd3AOq.mjs +0 -81
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-fYKd3AOq.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-D8HLxbUb.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-CWXgE2E_.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs +0 -140
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-BSAe0CfZ.mjs +0 -102
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-BSAe0CfZ.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs","sources":["../../../projects/admin/src/lib/pages/customers/customers.component.ts","../../../projects/admin/src/lib/pages/customers/customers.component.html","../../../projects/admin/src/lib/pages/customers/customers.module.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { notify, using } from '@thescaffold/ngx-core';\nimport { FlyoutService } from '@thescaffold/ngx-ui';\nimport { firstValueFrom, takeUntil } from 'rxjs';\nimport { ListPageDirective } from '../_shared/list-page.base';\n\n// R1 production-readiness pass — ADM-05. Was list-only with no drill-in\n// at all. Adds a detail flyout: order history, support tickets, group/\n// status editing. Wallet and act-on-behalf are real, separate scope —\n// no `WalletAccount` entity exists yet (that's P10.10/R3), and\n// impersonating a customer's session is an auth feature, not a display\n// one; both deserve their own careful pass rather than a stub here.\n@Component({\n standalone: false,\n selector: 'x-customers',\n templateUrl: './customers.component.html',\n styleUrl: './customers.component.scss',\n})\nexport class CustomersComponent extends ListPageDirective {\n private readonly flyoutService = inject(FlyoutService);\n\n protected pluralName = 'customers';\n protected dataSource = this.apiService.on('apps/commerce/customer');\n private readonly orderSource = this.apiService.on('apps/commerce/order');\n private readonly ticketSource = this.apiService.on('apps/commerce/complaint-log');\n private readonly groupSource = this.apiService.on('apps/commerce/customer-group');\n\n protected columns = [\n { key: 'name', value: 'Name' },\n { key: 'email', value: 'Email' },\n { key: 'phone', value: 'Phone' },\n { key: 'createdAt', value: 'Joined', type: 'date' },\n ];\n\n detail: any = null;\n orders: any[] = [];\n tickets: any[] = [];\n groups: { id: string; name: string }[] = [];\n saving = false;\n\n readonly statuses = ['active', 'suspended'];\n\n @ViewChild('detailFlyout', { read: TemplateRef, static: true })\n detailFlyout!: TemplateRef<any>;\n\n override init = () => {\n this.list();\n this.groupSource\n .getMany({ page: 1, perPage: 100 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(using((res: any) => (this.groups = res?.data ?? [])));\n };\n\n protected override extraCollectionFields() {\n return {\n links: {\n secondary: [{ title: 'View', fn: (_link: any, item: any) => this.view(item) }],\n },\n };\n }\n\n async view(item: any): Promise<void> {\n this.detail = null;\n this.orders = [];\n this.tickets = [];\n this.flyoutService.open(this.detailFlyout);\n\n const [detailRes, ordersRes, ticketsRes]: any = await Promise.all([\n firstValueFrom(this.dataSource.getOne(item.id)),\n firstValueFrom(this.orderSource.getMany({ customerId: item.id, page: 1, perPage: 20 } as any)),\n firstValueFrom(this.ticketSource.getMany({ customerId: item.id, page: 1, perPage: 20 } as any)),\n ]);\n this.detail = detailRes?.data ?? item;\n this.orders = ordersRes?.data ?? [];\n this.tickets = ticketsRes?.data ?? [];\n }\n\n async save(): Promise<void> {\n if (!this.detail) return;\n this.saving = true;\n try {\n await firstValueFrom(\n this.dataSource.update(this.detail.id, {\n status: this.detail.status,\n customerGroupId: this.detail.customerGroupId || undefined,\n } as any),\n );\n notify('Customer saved.', undefined, 'success');\n this.list(this.page, this.perPage);\n } catch {\n notify('Could not save the customer.', undefined, 'error');\n } finally {\n this.saving = false;\n }\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Customers</div>\n <div class=\"x-page-subtitle\">Commerce customer records — orders, comms and group membership.</div>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Customer detail' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div>\n <div class=\"fw-bold\">{{ detail.name || '—' }}</div>\n <div class=\"small text-secondary\">{{ detail.email }} @if (detail.phone) { · {{ detail.phone }} }</div>\n </div>\n\n <div class=\"d-flex flex-wrap gap-2\">\n <select class=\"form-select form-select-sm\" style=\"width:auto\" [(ngModel)]=\"detail.status\">\n @for (s of statuses; track s) { <option [value]=\"s\">{{ s }}</option> }\n </select>\n <select class=\"form-select form-select-sm\" style=\"width:auto\" [(ngModel)]=\"detail.customerGroupId\">\n <option value=\"\">— no group —</option>\n @for (g of groups; track g.id) { <option [value]=\"g.id\">{{ g.name }}</option> }\n </select>\n <button type=\"button\" class=\"btn btn-sm btn-outline-dark\" [disabled]=\"saving\" (click)=\"save()\">\n {{ saving ? 'Saving…' : 'Save' }}\n </button>\n </div>\n\n <hr class=\"my-1\" />\n\n <div>\n <div class=\"fw-bold small mb-1\">Orders ({{ orders.length }})</div>\n @for (o of orders; track o.id) {\n <div class=\"small text-secondary d-flex justify-content-between\">\n <a [routerLink]=\"['/admin/orders']\" [queryParams]=\"{ q: o.orderNumber }\">{{ o.orderNumber }}</a>\n <span>{{ o.status }} · {{ o.currency }} {{ o.grandTotal }}</span>\n </div>\n } @empty {\n <div class=\"small text-secondary\">No orders yet.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">Support tickets ({{ tickets.length }})</div>\n @for (t of tickets; track t.id) {\n <div class=\"small text-secondary\">\n {{ t.subject || t.category }} · {{ t.status }} · {{ t.priority }}\n </div>\n } @empty {\n <div class=\"small text-secondary\">None.</div>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';\nimport { CustomersComponent } from './customers.component';\n\n@NgModule({\n declarations: [CustomersComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: CustomersComponent }]),\n ],\n})\nexport class CustomersModule {}\n"],"names":["i2","i3","i4","i1"],"mappings":";;;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAOM,MAAO,kBAAmB,SAAQ,iBAAiB,CAAA;AANzD,IAAA,WAAA,GAAA;;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAE5C,IAAA,CAAA,UAAU,GAAG,WAAW;QACxB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,wBAAwB,CAAC;QAClD,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC;QACvD,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,6BAA6B,CAAC;QAChE,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,8BAA8B,CAAC;AAEvE,QAAA,IAAA,CAAA,OAAO,GAAG;AAClB,YAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,YAAA,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;AAChC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AAA,CAAA,EAAA;;sBA4BtB,SAAS;uBAAC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;;;ME3BnD,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAf,eAAe,EAAA,YAAA,EAAA,CARX,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAE/B,YAAY;YACZ,cAAc;YACd,aAAa,EAAAC,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANxB,YAAY;YACZ,cAAc;YACd,aAAa;AACb,YAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAG3D,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;AAClC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,aAAa;AACb,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;AACrE,qBAAA;AACF,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-customers.module-BohEH2SB.mjs","sources":["../../../projects/admin/src/lib/pages/customers/customers.component.ts","../../../projects/admin/src/lib/pages/customers/customers.component.html","../../../projects/admin/src/lib/pages/customers/customers.module.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { notify, using } from '@thescaffold/ngx-core';\nimport { FlyoutService } from '@thescaffold/ngx-ui';\nimport { firstValueFrom, takeUntil } from 'rxjs';\nimport { ListPageDirective } from '../_shared/list-page.base';\n\n// R1 production-readiness pass — ADM-05. Was list-only with no drill-in\n// at all. Adds a detail flyout: order history, support tickets, group/\n// status editing. Wallet and act-on-behalf are real, separate scope —\n// no `WalletAccount` entity exists yet (that's P10.10/R3), and\n// impersonating a customer's session is an auth feature, not a display\n// one; both deserve their own careful pass rather than a stub here.\n@Component({\n standalone: false,\n selector: 'x-customers',\n templateUrl: './customers.component.html',\n styleUrl: './customers.component.scss',\n})\nexport class CustomersComponent extends ListPageDirective {\n private readonly flyoutService = inject(FlyoutService);\n\n protected pluralName = 'customers';\n protected dataSource = this.apiService.on('apps/commerce/customer');\n private readonly orderSource = this.apiService.on('apps/commerce/order');\n private readonly ticketSource = this.apiService.on('apps/commerce/complaint-log');\n private readonly groupSource = this.apiService.on('apps/commerce/customer-group');\n\n protected columns = [\n { key: 'name', value: 'Name' },\n { key: 'email', value: 'Email' },\n { key: 'phone', value: 'Phone' },\n { key: 'createdAt', value: 'Joined', type: 'date' },\n ];\n\n detail: any = null;\n orders: any[] = [];\n tickets: any[] = [];\n groups: { id: string; name: string }[] = [];\n saving = false;\n\n readonly statuses = ['active', 'suspended'];\n\n @ViewChild('detailFlyout', { read: TemplateRef, static: true })\n detailFlyout!: TemplateRef<any>;\n\n override init = () => {\n this.list();\n this.groupSource\n .getMany({ page: 1, perPage: 100 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(using((res: any) => (this.groups = res?.data ?? [])));\n };\n\n protected override extraCollectionFields() {\n return {\n links: {\n secondary: [{ title: 'View', fn: (_link: any, item: any) => this.view(item) }],\n },\n };\n }\n\n async view(item: any): Promise<void> {\n this.detail = null;\n this.orders = [];\n this.tickets = [];\n this.flyoutService.open(this.detailFlyout);\n\n const [detailRes, ordersRes, ticketsRes]: any = await Promise.all([\n firstValueFrom(this.dataSource.getOne(item.id)),\n firstValueFrom(this.orderSource.getMany({ customerId: item.id, page: 1, perPage: 20 } as any)),\n firstValueFrom(this.ticketSource.getMany({ customerId: item.id, page: 1, perPage: 20 } as any)),\n ]);\n this.detail = detailRes?.data ?? item;\n this.orders = ordersRes?.data ?? [];\n this.tickets = ticketsRes?.data ?? [];\n }\n\n async save(): Promise<void> {\n if (!this.detail) return;\n this.saving = true;\n try {\n await firstValueFrom(\n this.dataSource.update(this.detail.id, {\n status: this.detail.status,\n customerGroupId: this.detail.customerGroupId || undefined,\n } as any),\n );\n notify('Customer saved.', undefined, 'success');\n this.list(this.page, this.perPage);\n } catch {\n notify('Could not save the customer.', undefined, 'error');\n } finally {\n this.saving = false;\n }\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Customers</div>\n <div class=\"x-page-subtitle\">Commerce customer records — orders, comms and group membership.</div>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Customer detail' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div>\n <div class=\"fw-bold\">{{ detail.name || '—' }}</div>\n <div class=\"small text-secondary\">{{ detail.email }} @if (detail.phone) { · {{ detail.phone }} }</div>\n </div>\n\n <div class=\"d-flex flex-wrap gap-2\">\n <select class=\"form-select form-select-sm\" style=\"width:auto\" [(ngModel)]=\"detail.status\">\n @for (s of statuses; track s) { <option [value]=\"s\">{{ s }}</option> }\n </select>\n <select class=\"form-select form-select-sm\" style=\"width:auto\" [(ngModel)]=\"detail.customerGroupId\">\n <option value=\"\">— no group —</option>\n @for (g of groups; track g.id) { <option [value]=\"g.id\">{{ g.name }}</option> }\n </select>\n <button type=\"button\" class=\"btn btn-sm btn-outline-dark\" [disabled]=\"saving\" (click)=\"save()\">\n {{ saving ? 'Saving…' : 'Save' }}\n </button>\n </div>\n\n <hr class=\"my-1\" />\n\n <div>\n <div class=\"fw-bold small mb-1\">Orders ({{ orders.length }})</div>\n @for (o of orders; track o.id) {\n <div class=\"small text-secondary d-flex justify-content-between\">\n <a [routerLink]=\"['/admin/orders']\" [queryParams]=\"{ q: o.orderNumber }\">{{ o.orderNumber }}</a>\n <span>{{ o.status }} · {{ o.currency }} {{ o.grandTotal }}</span>\n </div>\n } @empty {\n <div class=\"small text-secondary\">No orders yet.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">Support tickets ({{ tickets.length }})</div>\n @for (t of tickets; track t.id) {\n <div class=\"small text-secondary\">\n {{ t.subject || t.category }} · {{ t.status }} · {{ t.priority }}\n </div>\n } @empty {\n <div class=\"small text-secondary\">None.</div>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';\nimport { CustomersComponent } from './customers.component';\n\n@NgModule({\n declarations: [CustomersComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: CustomersComponent }]),\n ],\n})\nexport class CustomersModule {}\n"],"names":["i2","i3","i4","i1"],"mappings":";;;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAOM,MAAO,kBAAmB,SAAQ,iBAAiB,CAAA;AANzD,IAAA,WAAA,GAAA;;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAE5C,IAAA,CAAA,UAAU,GAAG,WAAW;QACxB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,wBAAwB,CAAC;QAClD,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,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E;wBACP,YAAY;wBACZ,cAAc;wBACd,aAAa;AACb,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;AACrE,qBAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/router';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import { SharedModule } from '@thescaffold/ngx-core';
|
|
6
|
+
import * as i2 from '@thescaffold/ngx-ui';
|
|
7
|
+
import { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
|
+
import { S as SimpleCrudDirective, J as JsonBuilderComponent } from './isaiahiroko-tilmart-ngx-apps-admin-json-builder.component-BFroIYk9.mjs';
|
|
9
|
+
import * as i1 from '@angular/forms';
|
|
10
|
+
import * as i3 from '@angular/common';
|
|
11
|
+
|
|
12
|
+
// R1 production-readiness pass — PROMO-04. Previously missing entirely:
|
|
13
|
+
// the homepage composer's `flash_sale_rail` module references a flash
|
|
14
|
+
// sale by id, but there was no page to create the sale window itself.
|
|
15
|
+
// Per-SKU allocation/limits stay a follow-up — this covers the sale
|
|
16
|
+
// window (name, schedule, channels), which is what a module needs to
|
|
17
|
+
// resolve and what ops needs to schedule ahead of time.
|
|
18
|
+
class FlashSalesComponent extends SimpleCrudDirective {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.pageTitle = 'Flash sales';
|
|
22
|
+
this.pageSubtitle = 'Time-boxed sale windows referenced by the homepage flash-sale rail.';
|
|
23
|
+
this.singularLabel = 'flash sale';
|
|
24
|
+
this.pluralName = 'flash sales';
|
|
25
|
+
this.dataSource = this.apiService.on('apps/commerce/flash-sale');
|
|
26
|
+
this.columns = [
|
|
27
|
+
{ key: 'name', value: 'Name' },
|
|
28
|
+
{ key: 'statusHtml', value: 'Status' },
|
|
29
|
+
{ key: 'startsAt', value: 'Starts', type: 'date' },
|
|
30
|
+
{ key: 'endsAt', value: 'Ends', type: 'date' },
|
|
31
|
+
];
|
|
32
|
+
this.fields = [
|
|
33
|
+
{ key: 'name', label: 'Name', type: 'text', required: true },
|
|
34
|
+
{ key: 'description', label: 'Description', type: 'textarea' },
|
|
35
|
+
{
|
|
36
|
+
key: 'status',
|
|
37
|
+
label: 'Status',
|
|
38
|
+
type: 'select',
|
|
39
|
+
options: [
|
|
40
|
+
{ value: 'draft', label: 'Draft' },
|
|
41
|
+
{ value: 'scheduled', label: 'Scheduled' },
|
|
42
|
+
{ value: 'live', label: 'Live' },
|
|
43
|
+
{ value: 'ended', label: 'Ended' },
|
|
44
|
+
{ value: 'cancelled', label: 'Cancelled' },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{ key: 'startsAt', label: 'Starts at', type: 'date' },
|
|
48
|
+
{ key: 'endsAt', label: 'Ends at', type: 'date' },
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FlashSalesComponent, isStandalone: false, selector: "x-flash-sales", usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">{{ pageTitle }}</div>\n <div class=\"x-page-subtitle\">{{ pageSubtitle }}</div>\n</div>\n\n@if (!editing) {\n <div class=\"x-scrud-toolbar\">\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" (click)=\"startCreate()\">+ New {{ singularLabel }}</button>\n </div>\n\n @if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n } @else {\n <x-element-loader></x-element-loader>\n }\n} @else if (draft) {\n <div class=\"x-scrud-editor\">\n <div class=\"x-scrud-editor-head\">\n <div class=\"x-scrud-editor-title\">{{ draft['id'] ? 'Edit' : 'New' }} {{ singularLabel }}</div>\n <div class=\"x-scrud-editor-actions\">\n @if (draft['id'] && !hideDelete) {\n <button type=\"button\" class=\"x-scrud-btn x-scrud-danger\" (click)=\"remove(draft); cancelEdit()\">Delete</button>\n }\n <button type=\"button\" class=\"x-scrud-btn\" (click)=\"cancelEdit()\">Close</button>\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" [disabled]=\"saving\" (click)=\"save()\">\n {{ saving ? 'Saving\u2026' : 'Save' }}\n </button>\n </div>\n </div>\n\n <div class=\"x-scrud-grid\">\n @for (f of fields; track f.key) {\n @if (f.type === 'builder') {\n <!-- a div, not a label: a label would forward every click inside the\n builder to its first checkbox -->\n <div class=\"x-scrud-f x-scrud-f-wide\" [attr.data-testid]=\"'field-' + f.key\">\n <span>{{ f.label }}</span>\n <x-json-builder [kind]=\"f.builder!\" [(value)]=\"draft[f.key]\"></x-json-builder>\n </div>\n } @else {\n <label class=\"x-scrud-f\" [class.x-scrud-f-wide]=\"f.type === 'textarea' || f.type === 'json'\">\n {{ f.label }}\n @if (f.required) {\n <span class=\"x-scrud-required\">*</span>\n }\n @switch (f.type) {\n @case ('boolean') {\n <input type=\"checkbox\" [(ngModel)]=\"draft[f.key]\" />\n }\n @case ('select') {\n @if (f.allowCustom) {\n <select [ngModel]=\"selectValue(f)\" (ngModelChange)=\"onSelect(f, $event)\" [attr.data-testid]=\"'select-' + f.key\">\n <option value=\"\">\u2014 choose \u2014</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n <option [value]=\"customOption\">Other\u2026</option>\n </select>\n @if (selectValue(f) === customOption) {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || 'Type a name'\" [attr.data-testid]=\"'custom-' + f.key\" />\n }\n } @else {\n <select [(ngModel)]=\"draft[f.key]\">\n <option value=\"\">\u2014 choose \u2014</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n }\n @case ('textarea') {\n <textarea rows=\"3\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\"></textarea>\n }\n @case ('json') {\n <textarea rows=\"4\" class=\"x-scrud-json\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || '{}'\"></textarea>\n }\n @case ('number') {\n <input type=\"number\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n @case ('date') {\n <input type=\"datetime-local\" [(ngModel)]=\"draft[f.key]\" />\n }\n @default {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n }\n </label>\n }\n }\n </div>\n </div>\n}\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-scrud-toolbar{display:flex;justify-content:flex-end;margin-bottom:14px}.x-scrud-btn{border:1px solid var(--color-border);background:transparent;border-radius:var(--radius-md);padding:6px 14px;font-size:12.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-scrud-btn:disabled{opacity:.5;cursor:default}.x-scrud-btn-primary{border-color:var(--color-accent);color:var(--color-accent-hover)}.x-scrud-danger{color:var(--color-danger, #c0362c)}.x-scrud-editor{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:16px;display:flex;flex-direction:column;gap:14px}.x-scrud-editor-head{display:flex;align-items:center;justify-content:space-between}.x-scrud-editor-title{font-size:16px;font-weight:800;color:var(--color-text)}.x-scrud-editor-actions{display:flex;gap:8px}.x-scrud-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.x-scrud-f{display:flex;flex-direction:column;gap:4px;font-size:11.5px;color:var(--color-text-muted);font-weight:700}.x-scrud-f-wide{grid-column:1/-1}.x-scrud-f input,.x-scrud-f select,.x-scrud-f textarea{border:1px solid var(--color-border);border-radius:var(--radius-md);padding:6px 10px;font-size:13px;background:var(--color-surface);color:var(--color-text);font-weight:400}.x-scrud-f input[type=checkbox]{width:18px;height:18px}.x-scrud-pwd{position:relative;display:flex}.x-scrud-pwd input{flex:1;padding-right:34px!important}.x-scrud-pwd-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:none;background:transparent;color:var(--color-text-muted);padding:4px 6px;cursor:pointer}.x-scrud-pwd-toggle:hover{color:var(--color-text)}.x-scrud-json{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.x-scrud-required{color:var(--color-danger, #c0362c)}\n"], dependencies: [{ kind: "component", type: JsonBuilderComponent, selector: "x-json-builder", inputs: ["kind", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i2.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesComponent, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ standalone: false, selector: 'x-flash-sales', template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">{{ pageTitle }}</div>\n <div class=\"x-page-subtitle\">{{ pageSubtitle }}</div>\n</div>\n\n@if (!editing) {\n <div class=\"x-scrud-toolbar\">\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" (click)=\"startCreate()\">+ New {{ singularLabel }}</button>\n </div>\n\n @if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n } @else {\n <x-element-loader></x-element-loader>\n }\n} @else if (draft) {\n <div class=\"x-scrud-editor\">\n <div class=\"x-scrud-editor-head\">\n <div class=\"x-scrud-editor-title\">{{ draft['id'] ? 'Edit' : 'New' }} {{ singularLabel }}</div>\n <div class=\"x-scrud-editor-actions\">\n @if (draft['id'] && !hideDelete) {\n <button type=\"button\" class=\"x-scrud-btn x-scrud-danger\" (click)=\"remove(draft); cancelEdit()\">Delete</button>\n }\n <button type=\"button\" class=\"x-scrud-btn\" (click)=\"cancelEdit()\">Close</button>\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" [disabled]=\"saving\" (click)=\"save()\">\n {{ saving ? 'Saving\u2026' : 'Save' }}\n </button>\n </div>\n </div>\n\n <div class=\"x-scrud-grid\">\n @for (f of fields; track f.key) {\n @if (f.type === 'builder') {\n <!-- a div, not a label: a label would forward every click inside the\n builder to its first checkbox -->\n <div class=\"x-scrud-f x-scrud-f-wide\" [attr.data-testid]=\"'field-' + f.key\">\n <span>{{ f.label }}</span>\n <x-json-builder [kind]=\"f.builder!\" [(value)]=\"draft[f.key]\"></x-json-builder>\n </div>\n } @else {\n <label class=\"x-scrud-f\" [class.x-scrud-f-wide]=\"f.type === 'textarea' || f.type === 'json'\">\n {{ f.label }}\n @if (f.required) {\n <span class=\"x-scrud-required\">*</span>\n }\n @switch (f.type) {\n @case ('boolean') {\n <input type=\"checkbox\" [(ngModel)]=\"draft[f.key]\" />\n }\n @case ('select') {\n @if (f.allowCustom) {\n <select [ngModel]=\"selectValue(f)\" (ngModelChange)=\"onSelect(f, $event)\" [attr.data-testid]=\"'select-' + f.key\">\n <option value=\"\">\u2014 choose \u2014</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n <option [value]=\"customOption\">Other\u2026</option>\n </select>\n @if (selectValue(f) === customOption) {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || 'Type a name'\" [attr.data-testid]=\"'custom-' + f.key\" />\n }\n } @else {\n <select [(ngModel)]=\"draft[f.key]\">\n <option value=\"\">\u2014 choose \u2014</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n }\n @case ('textarea') {\n <textarea rows=\"3\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\"></textarea>\n }\n @case ('json') {\n <textarea rows=\"4\" class=\"x-scrud-json\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || '{}'\"></textarea>\n }\n @case ('number') {\n <input type=\"number\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n @case ('date') {\n <input type=\"datetime-local\" [(ngModel)]=\"draft[f.key]\" />\n }\n @default {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n }\n </label>\n }\n }\n </div>\n </div>\n}\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-scrud-toolbar{display:flex;justify-content:flex-end;margin-bottom:14px}.x-scrud-btn{border:1px solid var(--color-border);background:transparent;border-radius:var(--radius-md);padding:6px 14px;font-size:12.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-scrud-btn:disabled{opacity:.5;cursor:default}.x-scrud-btn-primary{border-color:var(--color-accent);color:var(--color-accent-hover)}.x-scrud-danger{color:var(--color-danger, #c0362c)}.x-scrud-editor{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:16px;display:flex;flex-direction:column;gap:14px}.x-scrud-editor-head{display:flex;align-items:center;justify-content:space-between}.x-scrud-editor-title{font-size:16px;font-weight:800;color:var(--color-text)}.x-scrud-editor-actions{display:flex;gap:8px}.x-scrud-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.x-scrud-f{display:flex;flex-direction:column;gap:4px;font-size:11.5px;color:var(--color-text-muted);font-weight:700}.x-scrud-f-wide{grid-column:1/-1}.x-scrud-f input,.x-scrud-f select,.x-scrud-f textarea{border:1px solid var(--color-border);border-radius:var(--radius-md);padding:6px 10px;font-size:13px;background:var(--color-surface);color:var(--color-text);font-weight:400}.x-scrud-f input[type=checkbox]{width:18px;height:18px}.x-scrud-pwd{position:relative;display:flex}.x-scrud-pwd input{flex:1;padding-right:34px!important}.x-scrud-pwd-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:none;background:transparent;color:var(--color-text-muted);padding:4px 6px;cursor:pointer}.x-scrud-pwd-toggle:hover{color:var(--color-text)}.x-scrud-json{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.x-scrud-required{color:var(--color-danger, #c0362c)}\n"] }]
|
|
57
|
+
}] });
|
|
58
|
+
|
|
59
|
+
class FlashSalesModule {
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
61
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesModule, declarations: [FlashSalesComponent], imports: [JsonBuilderComponent,
|
|
62
|
+
SharedModule,
|
|
63
|
+
ElementsModule,
|
|
64
|
+
WebgetsModule, i1$1.RouterModule] }); }
|
|
65
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesModule, imports: [JsonBuilderComponent,
|
|
66
|
+
SharedModule,
|
|
67
|
+
ElementsModule,
|
|
68
|
+
WebgetsModule,
|
|
69
|
+
RouterModule.forChild([{ path: '', component: FlashSalesComponent }])] }); }
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FlashSalesModule, decorators: [{
|
|
72
|
+
type: NgModule,
|
|
73
|
+
args: [{
|
|
74
|
+
declarations: [FlashSalesComponent],
|
|
75
|
+
imports: [
|
|
76
|
+
JsonBuilderComponent,
|
|
77
|
+
SharedModule,
|
|
78
|
+
ElementsModule,
|
|
79
|
+
WebgetsModule,
|
|
80
|
+
RouterModule.forChild([{ path: '', component: FlashSalesComponent }]),
|
|
81
|
+
],
|
|
82
|
+
}]
|
|
83
|
+
}] });
|
|
84
|
+
|
|
85
|
+
export { FlashSalesModule };
|
|
86
|
+
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-z6apTF3A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-z6apTF3A.mjs","sources":["../../../projects/admin/src/lib/pages/flash-sales/flash-sales.component.ts","../../../projects/admin/src/lib/pages/_shared/simple-crud.component.html","../../../projects/admin/src/lib/pages/flash-sales/flash-sales.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CrudFieldSpec, SimpleCrudDirective } from '../_shared/simple-crud.base';\n\n// R1 production-readiness pass — PROMO-04. Previously missing entirely:\n// the homepage composer's `flash_sale_rail` module references a flash\n// sale by id, but there was no page to create the sale window itself.\n// Per-SKU allocation/limits stay a follow-up — this covers the sale\n// window (name, schedule, channels), which is what a module needs to\n// resolve and what ops needs to schedule ahead of time.\n@Component({\n standalone: false,\n selector: 'x-flash-sales',\n templateUrl: '../_shared/simple-crud.component.html',\n styleUrl: '../_shared/simple-crud.component.scss',\n})\nexport class FlashSalesComponent extends SimpleCrudDirective {\n protected pageTitle = 'Flash sales';\n protected pageSubtitle = 'Time-boxed sale windows referenced by the homepage flash-sale rail.';\n protected singularLabel = 'flash sale';\n protected pluralName = 'flash sales';\n protected dataSource = this.apiService.on('apps/commerce/flash-sale');\n\n protected columns = [\n { key: 'name', value: 'Name' },\n { key: 'statusHtml', value: 'Status' },\n { key: 'startsAt', value: 'Starts', type: 'date' },\n { key: 'endsAt', value: 'Ends', type: 'date' },\n ];\n\n protected fields: CrudFieldSpec[] = [\n { key: 'name', label: 'Name', type: 'text', required: true },\n { key: 'description', label: 'Description', type: 'textarea' },\n {\n key: 'status',\n label: 'Status',\n type: 'select',\n options: [\n { value: 'draft', label: 'Draft' },\n { value: 'scheduled', label: 'Scheduled' },\n { value: 'live', label: 'Live' },\n { value: 'ended', label: 'Ended' },\n { value: 'cancelled', label: 'Cancelled' },\n ],\n },\n { key: 'startsAt', label: 'Starts at', type: 'date' },\n { key: 'endsAt', label: 'Ends at', type: 'date' },\n ];\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">{{ pageTitle }}</div>\n <div class=\"x-page-subtitle\">{{ pageSubtitle }}</div>\n</div>\n\n@if (!editing) {\n <div class=\"x-scrud-toolbar\">\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" (click)=\"startCreate()\">+ New {{ singularLabel }}</button>\n </div>\n\n @if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n } @else {\n <x-element-loader></x-element-loader>\n }\n} @else if (draft) {\n <div class=\"x-scrud-editor\">\n <div class=\"x-scrud-editor-head\">\n <div class=\"x-scrud-editor-title\">{{ draft['id'] ? 'Edit' : 'New' }} {{ singularLabel }}</div>\n <div class=\"x-scrud-editor-actions\">\n @if (draft['id'] && !hideDelete) {\n <button type=\"button\" class=\"x-scrud-btn x-scrud-danger\" (click)=\"remove(draft); cancelEdit()\">Delete</button>\n }\n <button type=\"button\" class=\"x-scrud-btn\" (click)=\"cancelEdit()\">Close</button>\n <button type=\"button\" class=\"x-scrud-btn x-scrud-btn-primary\" [disabled]=\"saving\" (click)=\"save()\">\n {{ saving ? 'Saving…' : 'Save' }}\n </button>\n </div>\n </div>\n\n <div class=\"x-scrud-grid\">\n @for (f of fields; track f.key) {\n @if (f.type === 'builder') {\n <!-- a div, not a label: a label would forward every click inside the\n builder to its first checkbox -->\n <div class=\"x-scrud-f x-scrud-f-wide\" [attr.data-testid]=\"'field-' + f.key\">\n <span>{{ f.label }}</span>\n <x-json-builder [kind]=\"f.builder!\" [(value)]=\"draft[f.key]\"></x-json-builder>\n </div>\n } @else {\n <label class=\"x-scrud-f\" [class.x-scrud-f-wide]=\"f.type === 'textarea' || f.type === 'json'\">\n {{ f.label }}\n @if (f.required) {\n <span class=\"x-scrud-required\">*</span>\n }\n @switch (f.type) {\n @case ('boolean') {\n <input type=\"checkbox\" [(ngModel)]=\"draft[f.key]\" />\n }\n @case ('select') {\n @if (f.allowCustom) {\n <select [ngModel]=\"selectValue(f)\" (ngModelChange)=\"onSelect(f, $event)\" [attr.data-testid]=\"'select-' + f.key\">\n <option value=\"\">— choose —</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n <option [value]=\"customOption\">Other…</option>\n </select>\n @if (selectValue(f) === customOption) {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || 'Type a name'\" [attr.data-testid]=\"'custom-' + f.key\" />\n }\n } @else {\n <select [(ngModel)]=\"draft[f.key]\">\n <option value=\"\">— choose —</option>\n @for (opt of optionsFor(f); track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n }\n @case ('textarea') {\n <textarea rows=\"3\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\"></textarea>\n }\n @case ('json') {\n <textarea rows=\"4\" class=\"x-scrud-json\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || '{}'\"></textarea>\n }\n @case ('number') {\n <input type=\"number\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n @case ('date') {\n <input type=\"datetime-local\" [(ngModel)]=\"draft[f.key]\" />\n }\n @default {\n <input type=\"text\" [(ngModel)]=\"draft[f.key]\" [placeholder]=\"f.placeholder || ''\" />\n }\n }\n </label>\n }\n }\n </div>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';\nimport { FlashSalesComponent } from './flash-sales.component';\nimport { JsonBuilderComponent } from '../_shared/rule-builders/json-builder.component';\n\n@NgModule({\n declarations: [FlashSalesComponent],\n imports: [\n JsonBuilderComponent,\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: FlashSalesComponent }]),\n ],\n})\nexport class FlashSalesModule {}\n"],"names":["i1.JsonBuilderComponent","i2","i3","i4","i1"],"mappings":";;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AAOM,MAAO,mBAAoB,SAAQ,mBAAmB,CAAA;AAN5D,IAAA,WAAA,GAAA;;QAOY,I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,MAAA,EAAA,CAAA,49DAAA,CAAA,EAAA;;;MEMd,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAhB,gBAAgB,EAAA,YAAA,EAAA,CATZ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,oBAAoB;YACpB,YAAY;YACZ,cAAc;YACd,aAAa,EAAAC,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAPzB,oBAAoB;YACpB,YAAY;YACZ,cAAc;YACd,aAAa;AACb,YAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAG5D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,YAAY;wBACZ,cAAc;wBACd,aAAa;AACb,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACtE,qBAAA;AACF,iBAAA;;;;;"}
|
|
@@ -7,7 +7,7 @@ import * as i2 from '@thescaffold/ngx-ui';
|
|
|
7
7
|
import { FlyoutService, ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
8
|
import { HttpClient } from '@angular/common/http';
|
|
9
9
|
import { firstValueFrom, takeUntil, map } from 'rxjs';
|
|
10
|
-
import { L as ListPageDirective } from './isaiahiroko-tilmart-ngx-apps-admin-list-page.base-
|
|
10
|
+
import { L as ListPageDirective } from './isaiahiroko-tilmart-ngx-apps-admin-list-page.base-ChfiBo_X.mjs';
|
|
11
11
|
import * as i1 from '@angular/forms';
|
|
12
12
|
import * as i3 from '@angular/common';
|
|
13
13
|
|
|
@@ -37,7 +37,7 @@ class InstallationRequestsComponent extends ListPageDirective {
|
|
|
37
37
|
{ key: 'phone', value: 'Phone' },
|
|
38
38
|
{ key: 'serviceTypeLabel', value: 'Installation' },
|
|
39
39
|
{ key: 'state', value: 'State' },
|
|
40
|
-
{ key: '
|
|
40
|
+
{ key: 'statusHtml', value: 'Status' },
|
|
41
41
|
{ key: 'createdAt', value: 'Received', type: 'date' },
|
|
42
42
|
];
|
|
43
43
|
this.statuses = STATUSES;
|
|
@@ -220,4 +220,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
220
220
|
}] });
|
|
221
221
|
|
|
222
222
|
export { InstallationRequestsModule };
|
|
223
|
-
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-
|
|
223
|
+
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-Dnh9hEz_.mjs.map
|
package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-Dnh9hEz_.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-installation-requests.module-Dnh9hEz_.mjs","sources":["../../../projects/admin/src/lib/pages/installation-requests/installation-requests.component.ts","../../../projects/admin/src/lib/pages/installation-requests/installation-requests.component.html","../../../projects/admin/src/lib/pages/installation-requests/installation-requests.module.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Component, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { getEnv, notify, using } from '@thescaffold/ngx-core';\nimport { FlyoutService } from '@thescaffold/ngx-ui';\nimport { firstValueFrom, map, takeUntil } from 'rxjs';\nimport { ListPageDirective } from '../_shared/list-page.base';\n\nconst STATUSES: { value: string; label: string }[] = [\n { value: 'new', label: 'New' },\n { value: 'contacted', label: 'Contacted' },\n { value: 'site_visit_scheduled', label: 'Site visit scheduled' },\n { value: 'quoted', label: 'Quoted' },\n { value: 'won', label: 'Won' },\n { value: 'lost', label: 'Lost' },\n { value: 'closed', label: 'Closed' },\n];\n\ninterface PhotoVm {\n blobId: string;\n src: string;\n}\n\n// \"Request an installer\" leads. The customer form submits to\n// `apps/commerce/installation-request/submit` and a copy lands in the\n// installation mailbox; this page is where ops tracks each lead — contact\n// (tel / WhatsApp), move it along the pipeline, assign + note.\n@Component({\n standalone: false,\n selector: 'x-installation-requests',\n templateUrl: './installation-requests.component.html',\n styleUrl: './installation-requests.component.scss',\n})\nexport class InstallationRequestsComponent extends ListPageDirective {\n private readonly flyoutService = inject(FlyoutService);\n private readonly http = inject(HttpClient);\n\n protected pluralName = 'installation requests';\n protected dataSource = this.apiService.on('apps/commerce/installation-request');\n\n protected columns = [\n { key: 'reference', value: 'Reference' },\n { key: 'name', value: 'Customer' },\n { key: 'phone', value: 'Phone' },\n { key: 'serviceTypeLabel', value: 'Installation' },\n { key: 'state', value: 'State' },\n { key: 'statusHtml', value: 'Status' },\n { key: 'createdAt', value: 'Received', type: 'date' },\n ];\n\n readonly statuses = STATUSES;\n statusFilter = '';\n\n private typeLabels = new Map<string, string>();\n private propertyLabels = new Map<string, string>();\n\n detail: any = null;\n photos: PhotoVm[] = [];\n saving = false;\n editStatus = 'new';\n editAssignedTo = '';\n editNotes = '';\n\n @ViewChild('detailFlyout', { read: TemplateRef, static: true })\n detailFlyout!: TemplateRef<any>;\n\n override init = () => {\n void this.loadLabels().finally(() => this.list());\n };\n\n private async loadLabels(): Promise<void> {\n try {\n const res: any = await firstValueFrom(\n this.apiService.on('apps/commerce/static-list-item').getMany({\n page: 1,\n perPage: 200,\n listKey: 'installation-type',\n } as any),\n );\n for (const r of res?.data ?? []) this.typeLabels.set(r.code, r.label);\n const props: any = await firstValueFrom(\n this.apiService.on('apps/commerce/static-list-item').getMany({\n page: 1,\n perPage: 200,\n listKey: 'property-type',\n } as any),\n );\n for (const r of props?.data ?? []) this.propertyLabels.set(r.code, r.label);\n } catch {\n // codes render as-is\n }\n }\n\n // The base list has no filter slot; same body plus an exact-match `status`.\n override list(page = this.page, perPage = this.perPage, query = this.query): void {\n this.page = page;\n this.perPage = perPage;\n this.query = query;\n this.dataSource\n .getMany({\n page,\n perPage,\n ...(query ? { query } : {}),\n ...(this.statusFilter ? { status: this.statusFilter } : {}),\n } as any)\n .pipe(\n takeUntil(this.$),\n map((response: any) => this.toCollection(response)),\n )\n .subscribe(using((data) => this.list$.next(data)));\n }\n\n onFilterChange(): void {\n this.list(1, this.perPage);\n }\n\n protected override mapRow(row: any): any {\n return {\n ...row,\n serviceTypeLabel: this.typeLabels.get(row.serviceType) ?? row.serviceType,\n };\n }\n\n protected override extraCollectionFields() {\n return {\n links: {\n secondary: [{ title: 'Open', fn: (_link: any, item: any) => this.view(item) }],\n },\n };\n }\n\n typeLabel(code?: string): string {\n return (code && this.typeLabels.get(code)) || code || '';\n }\n\n propertyLabel(code?: string): string {\n return (code && this.propertyLabels.get(code)) || code || '';\n }\n\n statusLabel(value: string): string {\n return STATUSES.find((s) => s.value === value)?.label ?? value;\n }\n\n get telHref(): string {\n return this.detail?.phone ? `tel:${this.detail.phone}` : '';\n }\n\n // wa.me wants the international number with no `+`/leading zero.\n get whatsappHref(): string {\n const digits = String(this.detail?.phone ?? '').replace(/\\D/g, '');\n if (!digits) return '';\n const number = digits.startsWith('0') ? `234${digits.slice(1)}` : digits;\n const text = encodeURIComponent(\n `Hello ${this.detail?.name ?? ''}, this is Tilmart about your installation request ${this.detail?.reference ?? ''}.`,\n );\n return `https://wa.me/${number}?text=${text}`;\n }\n\n async view(item: any): Promise<void> {\n this.detail = null;\n this.photos = [];\n this.flyoutService.open(this.detailFlyout);\n\n const res: any = await firstValueFrom(this.dataSource.getOne(item.id));\n this.detail = res?.data ?? item;\n this.editStatus = this.detail.status;\n this.editAssignedTo = this.detail.assignedTo ?? '';\n this.editNotes = this.detail.internalNotes ?? '';\n void this.loadPhotos(this.detail);\n }\n\n // `<img src>` can't send the bearer header — fetch through HttpClient and\n // render a data URI (the app CSP allows `data:` but not `blob:`).\n private async loadPhotos(request: any): Promise<void> {\n const ids: string[] = request.photoBlobIds ?? [];\n for (const blobId of ids) {\n try {\n const blob = await firstValueFrom(\n this.http.get(\n `${getEnv('API_BASE_URL')}/apps/commerce/installation-request/${request.id}/photo/${blobId}`,\n { responseType: 'blob' },\n ),\n );\n const src = await new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n if (this.detail?.id === request.id) this.photos = [...this.photos, { blobId, src }];\n } catch {\n if (this.detail?.id === request.id) this.photos = [...this.photos, { blobId, src: '' }];\n }\n }\n }\n\n async save(): Promise<void> {\n if (!this.detail) return;\n this.saving = true;\n try {\n const res: any = await firstValueFrom(\n this.apiService.post(`apps/commerce/installation-request/${this.detail.id}/transition`, {\n status: this.editStatus,\n assignedTo: this.editAssignedTo,\n internalNotes: this.editNotes,\n }),\n );\n if (res?.status === 'error') {\n notify(res.message || 'Could not update the request.', undefined, 'error');\n return;\n }\n notify('Request updated.', undefined, 'success');\n this.detail = { ...this.detail, ...(res?.data ?? {}) };\n this.list(this.page, this.perPage);\n } catch {\n notify('Could not update the request.', undefined, 'error');\n } finally {\n this.saving = false;\n }\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Installation requests</div>\n <div class=\"x-page-subtitle\">\n “Request an installer” leads from the website and app — contact the customer, then track each one to an outcome.\n </div>\n</div>\n\n<div class=\"d-flex flex-wrap gap-2 align-items-center mb-3\">\n <label class=\"small text-secondary\" for=\"irStatus\">Status</label>\n <select\n id=\"irStatus\"\n class=\"form-select form-select-sm\"\n style=\"width: auto\"\n [(ngModel)]=\"statusFilter\"\n (ngModelChange)=\"onFilterChange()\"\n >\n <option value=\"\">All</option>\n @for (s of statuses; track s.value) {\n <option [value]=\"s.value\">{{ s.label }}</option>\n }\n </select>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Installation request' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div class=\"d-flex flex-wrap gap-2 align-items-center\">\n <strong>{{ detail.reference }}</strong>\n <span class=\"badge text-bg-light border\">{{ statusLabel(detail.status) }}</span>\n <span class=\"badge text-bg-light border\">{{ detail.source }}</span>\n <span class=\"small text-secondary ms-auto\">{{ detail.createdAt | date: 'MMM d, y, h:mm a' }}</span>\n </div>\n\n <div>\n <div class=\"fw-bold\">{{ detail.name }}</div>\n <div class=\"small\">{{ detail.phone }}@if (detail.email) { · {{ detail.email }} }</div>\n <div class=\"d-flex flex-wrap gap-2 mt-2\">\n <a class=\"btn btn-sm btn-outline-dark\" [href]=\"telHref\">Call</a>\n @if (detail.whatsappOk) {\n <a class=\"btn btn-sm btn-success\" [href]=\"whatsappHref\" target=\"_blank\" rel=\"noopener\">\n WhatsApp\n </a>\n } @else {\n <span class=\"small text-secondary align-self-center\">Customer prefers calls (not on WhatsApp)</span>\n }\n </div>\n </div>\n\n <div class=\"small\">\n <div><span class=\"text-secondary\">Installation:</span> {{ typeLabel(detail.serviceType) }}</div>\n @if (detail.propertyType) {\n <div><span class=\"text-secondary\">Property:</span> {{ propertyLabel(detail.propertyType) }}</div>\n }\n @if (detail.preferredTiming) {\n <div><span class=\"text-secondary\">Timing:</span> {{ detail.preferredTiming }}</div>\n }\n <div>\n <span class=\"text-secondary\">Location:</span>\n {{ detail.address }}, {{ detail.lga ? detail.lga + ', ' : '' }}{{ detail.state }}\n </div>\n </div>\n\n <div class=\"x-ir-desc small\">{{ detail.description }}</div>\n\n @if (detail.photoBlobIds?.length) {\n <div>\n <div class=\"fw-bold small mb-1\">Site photos ({{ detail.photoBlobIds.length }})</div>\n <div class=\"x-ir-photos\">\n @for (p of photos; track p.blobId) {\n <a class=\"x-ir-photo\" [href]=\"p.src\" target=\"_blank\" rel=\"noopener\">\n @if (p.src) {\n <img [src]=\"p.src\" alt=\"Site photo\" />\n } @else {\n <span>unavailable</span>\n }\n </a>\n }\n </div>\n </div>\n }\n\n <hr class=\"my-1\" />\n\n <div>\n <div class=\"fw-bold small mb-1\">Follow-up</div>\n <div class=\"d-flex flex-column gap-2\">\n <select class=\"form-select form-select-sm\" [(ngModel)]=\"editStatus\">\n @for (s of statuses; track s.value) {\n <option [value]=\"s.value\">{{ s.label }}</option>\n }\n </select>\n <input\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"Assigned to\"\n [(ngModel)]=\"editAssignedTo\"\n />\n <textarea\n class=\"form-control form-control-sm\"\n rows=\"3\"\n placeholder=\"Internal notes (not visible to the customer)\"\n [(ngModel)]=\"editNotes\"\n ></textarea>\n </div>\n <button type=\"button\" class=\"btn btn-sm btn-dark mt-2\" [disabled]=\"saving\" (click)=\"save()\">\n Save\n </button>\n @if (detail.contactedAt) {\n <span class=\"small text-secondary ms-2\">\n First contacted {{ detail.contactedAt | date: 'MMM d, h:mm a' }}\n </span>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';\nimport { InstallationRequestsComponent } from './installation-requests.component';\n\n@NgModule({\n declarations: [InstallationRequestsComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: InstallationR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