@isaiahiroko/tilmart-ngx-apps-admin 0.2.0 → 0.2.3
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-articles.module-OeLRnPwN.mjs → isaiahiroko-tilmart-ngx-apps-admin-articles.module-Cpx9BZcg.mjs} +5 -5
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-articles.module-OeLRnPwN.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-articles.module-Cpx9BZcg.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-attribute-templates.module-CwQnW1cH.mjs +239 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-attribute-templates.module-CwQnW1cH.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-audit.module-C9gvw8X2.mjs → isaiahiroko-tilmart-ngx-apps-admin-audit.module-D5YaCThD.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-audit.module-C9gvw8X2.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-audit.module-D5YaCThD.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-KSapnx6Y.mjs +76 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-KSapnx6Y.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-7I0ni-tQ.mjs +70 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-7I0ni-tQ.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-bulk-upload.module-BGTbsYUP.mjs +370 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-bulk-upload.module-BGTbsYUP.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-BwjfFXDU.mjs +562 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-BwjfFXDU.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-OTUfenf0.mjs +94 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-OTUfenf0.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs +137 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-xN-JUWwp.mjs → isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-JiFnNJj_.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-xN-JUWwp.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-JiFnNJj_.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-content.module-DLdKAUqc.mjs → isaiahiroko-tilmart-ngx-apps-admin-content.module-Bx6Zj0WX.mjs} +5 -5
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-content.module-DLdKAUqc.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-content.module-Bx6Zj0WX.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CoRh6Hxq.mjs +85 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CoRh6Hxq.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs +123 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-Bfgh3zE5.mjs → isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-CvFmMoJe.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-Bfgh3zE5.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-CvFmMoJe.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-C6tPNlup.mjs → isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-CuZwNVPO.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-C6tPNlup.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-CuZwNVPO.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-BPRnC17l.mjs +83 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-BPRnC17l.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-homepage.module-BZ3UmxE3.mjs → isaiahiroko-tilmart-ngx-apps-admin-homepage.module-vtAoIwSu.mjs} +5 -5
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-homepage.module-BZ3UmxE3.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-homepage.module-vtAoIwSu.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-inbox.module-BZDTa1L-.mjs → isaiahiroko-tilmart-ngx-apps-admin-inbox.module-CRkfjWQT.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-inbox.module-BZDTa1L-.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-inbox.module-CRkfjWQT.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs +66 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-macros.module-BO4bdER2.mjs → isaiahiroko-tilmart-ngx-apps-admin-macros.module-CElxL9W4.mjs} +5 -5
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-macros.module-BO4bdER2.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-macros.module-CElxL9W4.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-moderation.module-CZOCrias.mjs → isaiahiroko-tilmart-ngx-apps-admin-moderation.module-PGmFX7nk.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-moderation.module-CZOCrias.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-moderation.module-PGmFX7nk.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs → isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs → isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs} +4 -4
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-vldWwcAr.mjs +190 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-vldWwcAr.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs +114 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG03OY1q.mjs +94 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG03OY1q.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-queues.module-K-zYYVFy.mjs → isaiahiroko-tilmart-ngx-apps-admin-queues.module-D7iLwX0A.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-queues.module-K-zYYVFy.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-queues.module-D7iLwX0A.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-oQw5Xo5T.mjs +78 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-oQw5Xo5T.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-referrals.module-QLNhuh7q.mjs → isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs} +9 -34
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-reports.module-DBZov0We.mjs → isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs} +5 -5
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-reports.module-DBZov0We.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs.map} +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs +163 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-CGBBHwId.mjs +81 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-CGBBHwId.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-Cz6xPNwB.mjs +318 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-Cz6xPNwB.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-shipments.module-XuaOKr8v.mjs → isaiahiroko-tilmart-ngx-apps-admin-shipments.module-Cs5CLamm.mjs} +13 -32
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-Cs5CLamm.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs +140 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-Bt9W1oGR.mjs +102 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-Bt9W1oGR.mjs.map +1 -0
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-trace.module-Pwr-82Rc.mjs → isaiahiroko-tilmart-ngx-apps-admin-trace.module-9sRlGZCC.mjs} +6 -6
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-trace.module-Pwr-82Rc.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-trace.module-9sRlGZCC.mjs.map} +1 -1
- package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-users.module-Bx_7fI2g.mjs → isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs} +9 -34
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs.map +1 -0
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs +104 -72
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs.map +1 -1
- package/package.json +1 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-baskets.module-_lHPl1dT.mjs +0 -294
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-baskets.module-_lHPl1dT.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-Bvx2tVOi.mjs +0 -224
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-Bvx2tVOi.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Ccsd8Yx3.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Ccsd8Yx3.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CQNCSlsd.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CQNCSlsd.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-12XdV9zo.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-12XdV9zo.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-Ddw49QW0.mjs +0 -185
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-Ddw49QW0.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-BhqAtTZs.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-BhqAtTZs.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-procurement.module-qXW-g0pf.mjs +0 -274
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-procurement.module-qXW-g0pf.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG9uTDqX.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG9uTDqX.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-QLNhuh7q.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs +0 -106
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs +0 -105
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs +0 -222
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-XuaOKr8v.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-DYiAkF7E.mjs +0 -107
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-DYiAkF7E.mjs.map +0 -1
- package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-users.module-Bx_7fI2g.mjs.map +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
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 { BaseDirective, using, titleCase, SharedModule } from '@thescaffold/ngx-core';
|
|
6
|
-
import * as i1 from '@thescaffold/ngx-ui';
|
|
7
|
-
import { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
|
-
import { BehaviorSubject, takeUntil, map } from 'rxjs';
|
|
9
|
-
import * as i2 from '@angular/common';
|
|
10
|
-
|
|
11
|
-
// P7.1 — ops console section pass (PRD 6.2, TRD 9.2). A standard list
|
|
12
|
-
// view on `x-webget-collection` over `apps/commerce/redirect`, matching the
|
|
13
|
-
// established admin pattern (users, routes, inbox). ops CRUD is covered
|
|
14
|
-
// by `admin:*:apps:commerce:*`.
|
|
15
|
-
class RedirectsComponent extends BaseDirective {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.pluralName = 'redirects';
|
|
19
|
-
this.dataSource = this.apiService.on('apps/commerce/redirect');
|
|
20
|
-
this.columns = [
|
|
21
|
-
{ key: 'fromPath', value: 'From' },
|
|
22
|
-
{ key: 'toPath', value: 'To' },
|
|
23
|
-
{ key: 'statusCode', value: 'Code' },
|
|
24
|
-
{ key: 'hitCount', value: 'Hits' },
|
|
25
|
-
];
|
|
26
|
-
this.page = 1;
|
|
27
|
-
this.perPage = 25;
|
|
28
|
-
this.list$ = new BehaviorSubject(null);
|
|
29
|
-
this.init = () => {
|
|
30
|
-
this.list();
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
list(page = this.page, perPage = this.perPage) {
|
|
34
|
-
this.dataSource
|
|
35
|
-
.getMany({ page, perPage })
|
|
36
|
-
.pipe(takeUntil(this.$), map((response) => this.toCollection(response)))
|
|
37
|
-
.subscribe(using((data) => this.list$.next(data)));
|
|
38
|
-
}
|
|
39
|
-
toCollection(response) {
|
|
40
|
-
return {
|
|
41
|
-
title: titleCase(this.pluralName),
|
|
42
|
-
columns: this.columns,
|
|
43
|
-
rows: response?.data,
|
|
44
|
-
hasHeaders: true,
|
|
45
|
-
hasTextFilter: true,
|
|
46
|
-
page: response?.meta?.current_page,
|
|
47
|
-
perPage: response?.meta?.per_page,
|
|
48
|
-
total: response?.meta?.total,
|
|
49
|
-
onPage: (page) => this.list(page),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RedirectsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: RedirectsComponent, isStandalone: false, selector: "x-redirects", usesInheritance: true, ngImport: i0, template: `
|
|
54
|
-
<div class="x-page-head">
|
|
55
|
-
<div class="x-page-title">Redirects</div>
|
|
56
|
-
<div class="x-page-subtitle">Stored 301/302 path redirects — auto-minted on slug changes (CMS-06).</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
@if (list$ | async; as list) {
|
|
60
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
61
|
-
} @else {
|
|
62
|
-
<x-element-loader></x-element-loader>
|
|
63
|
-
}
|
|
64
|
-
`, isInline: true, 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}\n"], dependencies: [{ kind: "component", type: i1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i1.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RedirectsComponent, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{ standalone: false, selector: 'x-redirects', template: `
|
|
69
|
-
<div class="x-page-head">
|
|
70
|
-
<div class="x-page-title">Redirects</div>
|
|
71
|
-
<div class="x-page-subtitle">Stored 301/302 path redirects — auto-minted on slug changes (CMS-06).</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
@if (list$ | async; as list) {
|
|
75
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
76
|
-
} @else {
|
|
77
|
-
<x-element-loader></x-element-loader>
|
|
78
|
-
}
|
|
79
|
-
`, 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}\n"] }]
|
|
80
|
-
}] });
|
|
81
|
-
|
|
82
|
-
class RedirectsModule {
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RedirectsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
84
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: RedirectsModule, declarations: [RedirectsComponent], imports: [SharedModule,
|
|
85
|
-
ElementsModule,
|
|
86
|
-
WebgetsModule, i1$1.RouterModule] }); }
|
|
87
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RedirectsModule, imports: [SharedModule,
|
|
88
|
-
ElementsModule,
|
|
89
|
-
WebgetsModule,
|
|
90
|
-
RouterModule.forChild([{ path: '', component: RedirectsComponent }])] }); }
|
|
91
|
-
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RedirectsModule, decorators: [{
|
|
93
|
-
type: NgModule,
|
|
94
|
-
args: [{
|
|
95
|
-
declarations: [RedirectsComponent],
|
|
96
|
-
imports: [
|
|
97
|
-
SharedModule,
|
|
98
|
-
ElementsModule,
|
|
99
|
-
WebgetsModule,
|
|
100
|
-
RouterModule.forChild([{ path: '', component: RedirectsComponent }]),
|
|
101
|
-
],
|
|
102
|
-
}]
|
|
103
|
-
}] });
|
|
104
|
-
|
|
105
|
-
export { RedirectsModule };
|
|
106
|
-
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs","sources":["../../../projects/admin/src/lib/pages/redirects/redirects.component.ts","../../../projects/admin/src/lib/pages/redirects/redirects.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, titleCase, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, map, takeUntil } from 'rxjs';\n\n// P7.1 — ops console section pass (PRD 6.2, TRD 9.2). A standard list\n// view on `x-webget-collection` over `apps/commerce/redirect`, matching the\n// established admin pattern (users, routes, inbox). ops CRUD is covered\n// by `admin:*:apps:commerce:*`.\n@Component({\n standalone: false,\n selector: 'x-redirects',\n template: `\n <div class=\"x-page-head\">\n <div class=\"x-page-title\">Redirects</div>\n <div class=\"x-page-subtitle\">Stored 301/302 path redirects — auto-minted on slug changes (CMS-06).</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 styles: [\n `\n .x-page-head {\n margin-bottom: 20px;\n }\n .x-page-title {\n font-size: 24px;\n font-weight: 800;\n color: var(--color-text);\n }\n .x-page-subtitle {\n font-size: 13.5px;\n color: var(--color-text-muted);\n margin-top: 2px;\n }\n `,\n ],\n})\nexport class RedirectsComponent extends BaseDirective {\n pluralName = 'redirects';\n dataSource = this.apiService.on('apps/commerce/redirect');\n\n columns = [\n { key: 'fromPath', value: 'From' },\n { key: 'toPath', value: 'To' },\n { key: 'statusCode', value: 'Code' },\n { key: 'hitCount', value: 'Hits' },\n ];\n\n page = 1;\n perPage = 25;\n\n list$ = new BehaviorSubject<any>(null);\n\n override init = () => {\n this.list();\n };\n\n list(page = this.page, perPage = this.perPage) {\n this.dataSource\n .getMany({ page, perPage })\n .pipe(\n takeUntil(this.$),\n map((response) => this.toCollection(response)),\n )\n .subscribe(using((data) => this.list$.next(data)));\n }\n\n private toCollection(response: any) {\n return {\n title: titleCase(this.pluralName),\n columns: this.columns,\n rows: response?.data,\n hasHeaders: true,\n hasTextFilter: true,\n page: response?.meta?.current_page,\n perPage: response?.meta?.per_page,\n total: response?.meta?.total,\n onPage: (page: number) => this.list(page),\n };\n }\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 { RedirectsComponent } from './redirects.component';\n\n@NgModule({\n declarations: [RedirectsComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: RedirectsComponent }]),\n ],\n})\nexport class RedirectsModule {}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACA;AAkCM,MAAO,kBAAmB,SAAQ,aAAa,CAAA;AAjCrD,IAAA,WAAA,GAAA;;QAkCE,IAAA,CAAA,UAAU,GAAG,WAAW;QACxB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,wBAAwB,CAAC;AAEzD,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE;AAClC,YAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9B,YAAA,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE;AACpC,YAAA,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE;SACnC;QAED,IAAA,CAAA,IAAI,GAAG,CAAC;QACR,IAAA,CAAA,OAAO,GAAG,EAAE;AAEZ,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,eAAe,CAAM,IAAI,CAAC;QAE7B,IAAA,CAAA,IAAI,GAAG,MAAK;YACnB,IAAI,CAAC,IAAI,EAAE;AACb,QAAA,CAAC;AAyBF,IAAA;IAvBC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,OAAO,EAAA;AAC3C,QAAA,IAAI,CAAC;AACF,aAAA,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;a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AAE,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-referrals.module-QLNhuh7q.mjs","sources":["../../../projects/admin/src/lib/pages/referrals/referrals.component.ts","../../../projects/admin/src/lib/pages/referrals/referrals.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, titleCase, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, takeUntil, map } from 'rxjs';\n\n// Referral/reward view (docs/TRD.md §7).\n@Component({\n standalone: false,\n selector: 'x-referrals',\n template: `\n <div class=\"x-page-head\">\n <div class=\"x-page-title\">Referrals</div>\n <div class=\"x-page-subtitle\">Who referred whom, and reward status.</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 styles: [\n `\n .x-page-head {\n margin-bottom: 20px;\n }\n .x-page-title {\n font-size: 24px;\n font-weight: 800;\n color: var(--color-text);\n }\n .x-page-subtitle {\n font-size: 13.5px;\n color: var(--color-text-muted);\n margin-top: 2px;\n }\n `,\n ],\n})\nexport class ReferralsComponent extends BaseDirective {\n name = 'referral';\n pluralName = 'referrals';\n // P5.14 — the commerce Referral (ACC-11); the Salama grocery route is gone.\n dataSource = this.apiService.on('apps/commerce/referral');\n\n columns = [\n { key: 'code', value: 'Code' },\n { key: 'referredContactPhone', value: 'Referred contact' },\n { key: 'status', value: 'Status', type: 'class', class: 'badge text-bg-light border' },\n { key: 'convertedAt', value: 'Converted', type: 'date' },\n { key: 'createdAt', value: 'Referred on', type: 'date' },\n ];\n\n page = 1;\n perPage = 25;\n\n list$ = new BehaviorSubject<any>(null);\n\n override init = () => {\n this.list();\n };\n\n list(page = this.page, perPage = this.perPage) {\n this.dataSource\n .getMany({ page, perPage })\n .pipe(\n takeUntil(this.$),\n map((response) => this.toCollection(response)),\n )\n .subscribe(using((data) => this.list$.next(data)));\n }\n\n private toCollection(response: any) {\n return {\n title: titleCase(this.pluralName),\n columns: this.columns,\n rows: response?.data,\n hasHeaders: true,\n hasTextFilter: true,\n page: response?.meta?.current_page,\n perPage: response?.meta?.per_page,\n total: response?.meta?.total,\n onPage: (page: number) => this.list(page),\n };\n }\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 { ReferralsComponent } from './referrals.component';\n\n@NgModule({\n declarations: [ReferralsComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: ReferralsComponent }]),\n ],\n})\nexport class ReferralsModule {}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAIA;AAkCM,MAAO,kBAAmB,SAAQ,aAAa,CAAA;AAjCrD,IAAA,WAAA,GAAA;;QAkCE,IAAA,CAAA,IAAI,GAAG,UAAU;QACjB,IAAA,CAAA,UAAU,GAAG,WAAW;;QAExB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,wBAAwB,CAAC;AAEzD,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,YAAA,EAAE,GAAG,EAAE,sBAAsB,EAAE,KAAK,EAAE,kBAA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AjC9B,SAAS;iCACI,KAAK,EAAA,QAAA,EACP,aAAa,EAAA,QAAA,EACb;;;;;;;;;;;AAWT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,wLAAA,CAAA,EAAA;;;MCJU,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,EAAAA,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,106 +0,0 @@
|
|
|
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 { BaseDirective, using, titleCase, SharedModule } from '@thescaffold/ngx-core';
|
|
6
|
-
import * as i1 from '@thescaffold/ngx-ui';
|
|
7
|
-
import { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
|
-
import { BehaviorSubject, takeUntil, map } from 'rxjs';
|
|
9
|
-
import * as i2 from '@angular/common';
|
|
10
|
-
|
|
11
|
-
// P7.1 — ops console section pass (PRD 6.2, TRD 9.2). A standard list
|
|
12
|
-
// view on `x-webget-collection` over `apps/commerce/return-request`, matching the
|
|
13
|
-
// established admin pattern (users, routes, inbox). ops CRUD is covered
|
|
14
|
-
// by `admin:*:apps:commerce:*`.
|
|
15
|
-
class ReturnsComponent extends BaseDirective {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.pluralName = 'returns';
|
|
19
|
-
this.dataSource = this.apiService.on('apps/commerce/return-request');
|
|
20
|
-
this.columns = [
|
|
21
|
-
{ key: 'rmaNumber', value: 'RMA' },
|
|
22
|
-
{ key: 'orderId', value: 'Order' },
|
|
23
|
-
{ key: 'status', value: 'Status', type: 'class', class: 'badge text-bg-light border' },
|
|
24
|
-
{ key: 'createdAt', value: 'Opened', type: 'date' },
|
|
25
|
-
];
|
|
26
|
-
this.page = 1;
|
|
27
|
-
this.perPage = 25;
|
|
28
|
-
this.list$ = new BehaviorSubject(null);
|
|
29
|
-
this.init = () => {
|
|
30
|
-
this.list();
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
list(page = this.page, perPage = this.perPage) {
|
|
34
|
-
this.dataSource
|
|
35
|
-
.getMany({ page, perPage })
|
|
36
|
-
.pipe(takeUntil(this.$), map((response) => this.toCollection(response)))
|
|
37
|
-
.subscribe(using((data) => this.list$.next(data)));
|
|
38
|
-
}
|
|
39
|
-
toCollection(response) {
|
|
40
|
-
return {
|
|
41
|
-
title: titleCase(this.pluralName),
|
|
42
|
-
columns: this.columns,
|
|
43
|
-
rows: response?.data,
|
|
44
|
-
hasHeaders: true,
|
|
45
|
-
hasTextFilter: true,
|
|
46
|
-
page: response?.meta?.current_page,
|
|
47
|
-
perPage: response?.meta?.per_page,
|
|
48
|
-
total: response?.meta?.total,
|
|
49
|
-
onPage: (page) => this.list(page),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ReturnsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ReturnsComponent, isStandalone: false, selector: "x-returns", usesInheritance: true, ngImport: i0, template: `
|
|
54
|
-
<div class="x-page-head">
|
|
55
|
-
<div class="x-page-title">Returns</div>
|
|
56
|
-
<div class="x-page-subtitle">RMA requests against delivered orders — triage, method and resolution.</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
@if (list$ | async; as list) {
|
|
60
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
61
|
-
} @else {
|
|
62
|
-
<x-element-loader></x-element-loader>
|
|
63
|
-
}
|
|
64
|
-
`, isInline: true, 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}\n"], dependencies: [{ kind: "component", type: i1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i1.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ReturnsComponent, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{ standalone: false, selector: 'x-returns', template: `
|
|
69
|
-
<div class="x-page-head">
|
|
70
|
-
<div class="x-page-title">Returns</div>
|
|
71
|
-
<div class="x-page-subtitle">RMA requests against delivered orders — triage, method and resolution.</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
@if (list$ | async; as list) {
|
|
75
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
76
|
-
} @else {
|
|
77
|
-
<x-element-loader></x-element-loader>
|
|
78
|
-
}
|
|
79
|
-
`, 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}\n"] }]
|
|
80
|
-
}] });
|
|
81
|
-
|
|
82
|
-
class ReturnsModule {
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ReturnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
84
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: ReturnsModule, declarations: [ReturnsComponent], imports: [SharedModule,
|
|
85
|
-
ElementsModule,
|
|
86
|
-
WebgetsModule, i1$1.RouterModule] }); }
|
|
87
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ReturnsModule, imports: [SharedModule,
|
|
88
|
-
ElementsModule,
|
|
89
|
-
WebgetsModule,
|
|
90
|
-
RouterModule.forChild([{ path: '', component: ReturnsComponent }])] }); }
|
|
91
|
-
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ReturnsModule, decorators: [{
|
|
93
|
-
type: NgModule,
|
|
94
|
-
args: [{
|
|
95
|
-
declarations: [ReturnsComponent],
|
|
96
|
-
imports: [
|
|
97
|
-
SharedModule,
|
|
98
|
-
ElementsModule,
|
|
99
|
-
WebgetsModule,
|
|
100
|
-
RouterModule.forChild([{ path: '', component: ReturnsComponent }]),
|
|
101
|
-
],
|
|
102
|
-
}]
|
|
103
|
-
}] });
|
|
104
|
-
|
|
105
|
-
export { ReturnsModule };
|
|
106
|
-
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs","sources":["../../../projects/admin/src/lib/pages/returns/returns.component.ts","../../../projects/admin/src/lib/pages/returns/returns.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, titleCase, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, map, takeUntil } from 'rxjs';\n\n// P7.1 — ops console section pass (PRD 6.2, TRD 9.2). A standard list\n// view on `x-webget-collection` over `apps/commerce/return-request`, matching the\n// established admin pattern (users, routes, inbox). ops CRUD is covered\n// by `admin:*:apps:commerce:*`.\n@Component({\n standalone: false,\n selector: 'x-returns',\n template: `\n <div class=\"x-page-head\">\n <div class=\"x-page-title\">Returns</div>\n <div class=\"x-page-subtitle\">RMA requests against delivered orders — triage, method and resolution.</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 styles: [\n `\n .x-page-head {\n margin-bottom: 20px;\n }\n .x-page-title {\n font-size: 24px;\n font-weight: 800;\n color: var(--color-text);\n }\n .x-page-subtitle {\n font-size: 13.5px;\n color: var(--color-text-muted);\n margin-top: 2px;\n }\n `,\n ],\n})\nexport class ReturnsComponent extends BaseDirective {\n pluralName = 'returns';\n dataSource = this.apiService.on('apps/commerce/return-request');\n\n columns = [\n { key: 'rmaNumber', value: 'RMA' },\n { key: 'orderId', value: 'Order' },\n { key: 'status', value: 'Status', type: 'class', class: 'badge text-bg-light border' },\n { key: 'createdAt', value: 'Opened', type: 'date' },\n ];\n\n page = 1;\n perPage = 25;\n\n list$ = new BehaviorSubject<any>(null);\n\n override init = () => {\n this.list();\n };\n\n list(page = this.page, perPage = this.perPage) {\n this.dataSource\n .getMany({ page, perPage })\n .pipe(\n takeUntil(this.$),\n map((response) => this.toCollection(response)),\n )\n .subscribe(using((data) => this.list$.next(data)));\n }\n\n private toCollection(response: any) {\n return {\n title: titleCase(this.pluralName),\n columns: this.columns,\n rows: response?.data,\n hasHeaders: true,\n hasTextFilter: true,\n page: response?.meta?.current_page,\n perPage: response?.meta?.per_page,\n total: response?.meta?.total,\n onPage: (page: number) => this.list(page),\n };\n }\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 { ReturnsComponent } from './returns.component';\n\n@NgModule({\n declarations: [ReturnsComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: ReturnsComponent }]),\n ],\n})\nexport class ReturnsModule {}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACA;AAkCM,MAAO,gBAAiB,SAAQ,aAAa,CAAA;AAjCnD,IAAA,WAAA,GAAA;;QAkCE,IAAA,CAAA,UAAU,GAAG,SAAS;QACtB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,8BAA8B,CAAC;AAE/D,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE;AAClC,YAAA,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE;AAClC,YAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,4BAA4B,EAAE;YACtF,EAAE,GAAG,EAAE,WAAW,EAAE,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,CAAA,CAAA;gHAAb,aAAa,EAAA,YAAA,EAAA,CART,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAE7B,YAAY;YACZ,cAAc;YACd,aAAa,EAAAA,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,aAAa,YANtB,YAAY;YACZ,cAAc;YACd,aAAa;AACb,YAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGzD,aAAa,EAAA,UAAA,EAAA,CAAA;kBATzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,aAAa;AACb,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;AACnE,qBAAA;AACF,iBAAA;;;;;"}
|
|
@@ -1,105 +0,0 @@
|
|
|
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 { BaseDirective, using, titleCase, SharedModule } from '@thescaffold/ngx-core';
|
|
6
|
-
import * as i1 from '@thescaffold/ngx-ui';
|
|
7
|
-
import { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
|
-
import { BehaviorSubject, takeUntil, map } from 'rxjs';
|
|
9
|
-
import * as i2 from '@angular/common';
|
|
10
|
-
|
|
11
|
-
// Route/cluster/day board (docs/TRD.md §7): a simple list, not a
|
|
12
|
-
// routing-optimization engine — matches the PRD's density model (which
|
|
13
|
-
// street/day, not turn-by-turn routing).
|
|
14
|
-
class RoutesComponent extends BaseDirective {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.name = 'route';
|
|
18
|
-
this.pluralName = 'routes';
|
|
19
|
-
this.dataSource = this.apiService.on('apps/grocery/route');
|
|
20
|
-
this.columns = [
|
|
21
|
-
{ key: 'name', value: 'Name' },
|
|
22
|
-
{ key: 'dayOfWeek', value: 'Day', type: 'class', class: 'badge text-bg-light border' },
|
|
23
|
-
{ key: 'vanCapacityKg', value: 'Van capacity (kg)' },
|
|
24
|
-
];
|
|
25
|
-
this.page = 1;
|
|
26
|
-
this.perPage = 25;
|
|
27
|
-
this.list$ = new BehaviorSubject(null);
|
|
28
|
-
this.init = () => {
|
|
29
|
-
this.list();
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
list(page = this.page, perPage = this.perPage) {
|
|
33
|
-
this.dataSource
|
|
34
|
-
.getMany({ page, perPage })
|
|
35
|
-
.pipe(takeUntil(this.$), map((response) => this.toCollection(response)))
|
|
36
|
-
.subscribe(using((data) => this.list$.next(data)));
|
|
37
|
-
}
|
|
38
|
-
toCollection(response) {
|
|
39
|
-
return {
|
|
40
|
-
title: titleCase(this.pluralName),
|
|
41
|
-
columns: this.columns,
|
|
42
|
-
rows: response?.data,
|
|
43
|
-
hasHeaders: true,
|
|
44
|
-
hasTextFilter: true,
|
|
45
|
-
page: response?.meta?.current_page,
|
|
46
|
-
perPage: response?.meta?.per_page,
|
|
47
|
-
total: response?.meta?.total,
|
|
48
|
-
onPage: (page) => this.list(page),
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RoutesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
52
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: RoutesComponent, isStandalone: false, selector: "x-routes", usesInheritance: true, ngImport: i0, template: `
|
|
53
|
-
<div class="x-page-head">
|
|
54
|
-
<div class="x-page-title">Routes</div>
|
|
55
|
-
<div class="x-page-subtitle">Street/estate clusters, by delivery day.</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
@if (list$ | async; as list) {
|
|
59
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
60
|
-
} @else {
|
|
61
|
-
<x-element-loader></x-element-loader>
|
|
62
|
-
}
|
|
63
|
-
`, isInline: true, 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}\n"], dependencies: [{ kind: "component", type: i1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i1.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: RoutesComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{ standalone: false, selector: 'x-routes', template: `
|
|
68
|
-
<div class="x-page-head">
|
|
69
|
-
<div class="x-page-title">Routes</div>
|
|
70
|
-
<div class="x-page-subtitle">Street/estate clusters, by delivery day.</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
@if (list$ | async; as list) {
|
|
74
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
75
|
-
} @else {
|
|
76
|
-
<x-element-loader></x-element-loader>
|
|
77
|
-
}
|
|
78
|
-
`, 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}\n"] }]
|
|
79
|
-
}] });
|
|
80
|
-
|
|
81
|
-
class GroceryRoutesModule {
|
|
82
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: GroceryRoutesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
83
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: GroceryRoutesModule, declarations: [RoutesComponent], imports: [SharedModule,
|
|
84
|
-
ElementsModule,
|
|
85
|
-
WebgetsModule, i1$1.RouterModule] }); }
|
|
86
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: GroceryRoutesModule, imports: [SharedModule,
|
|
87
|
-
ElementsModule,
|
|
88
|
-
WebgetsModule,
|
|
89
|
-
RouterModule.forChild([{ path: '', component: RoutesComponent }])] }); }
|
|
90
|
-
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: GroceryRoutesModule, decorators: [{
|
|
92
|
-
type: NgModule,
|
|
93
|
-
args: [{
|
|
94
|
-
declarations: [RoutesComponent],
|
|
95
|
-
imports: [
|
|
96
|
-
SharedModule,
|
|
97
|
-
ElementsModule,
|
|
98
|
-
WebgetsModule,
|
|
99
|
-
RouterModule.forChild([{ path: '', component: RoutesComponent }]),
|
|
100
|
-
],
|
|
101
|
-
}]
|
|
102
|
-
}] });
|
|
103
|
-
|
|
104
|
-
export { GroceryRoutesModule };
|
|
105
|
-
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs","sources":["../../../projects/admin/src/lib/pages/routes/routes.component.ts","../../../projects/admin/src/lib/pages/routes/routes.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, titleCase, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, takeUntil, map } from 'rxjs';\n\n// Route/cluster/day board (docs/TRD.md §7): a simple list, not a\n// routing-optimization engine — matches the PRD's density model (which\n// street/day, not turn-by-turn routing).\n@Component({\n standalone: false,\n selector: 'x-routes',\n template: `\n <div class=\"x-page-head\">\n <div class=\"x-page-title\">Routes</div>\n <div class=\"x-page-subtitle\">Street/estate clusters, by delivery day.</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 styles: [\n `\n .x-page-head {\n margin-bottom: 20px;\n }\n .x-page-title {\n font-size: 24px;\n font-weight: 800;\n color: var(--color-text);\n }\n .x-page-subtitle {\n font-size: 13.5px;\n color: var(--color-text-muted);\n margin-top: 2px;\n }\n `,\n ],\n})\nexport class RoutesComponent extends BaseDirective {\n name = 'route';\n pluralName = 'routes';\n dataSource = this.apiService.on('apps/grocery/route');\n\n columns = [\n { key: 'name', value: 'Name' },\n { key: 'dayOfWeek', value: 'Day', type: 'class', class: 'badge text-bg-light border' },\n { key: 'vanCapacityKg', value: 'Van capacity (kg)' },\n ];\n\n page = 1;\n perPage = 25;\n\n list$ = new BehaviorSubject<any>(null);\n\n override init = () => {\n this.list();\n };\n\n list(page = this.page, perPage = this.perPage) {\n this.dataSource\n .getMany({ page, perPage })\n .pipe(\n takeUntil(this.$),\n map((response) => this.toCollection(response)),\n )\n .subscribe(using((data) => this.list$.next(data)));\n }\n\n private toCollection(response: any) {\n return {\n title: titleCase(this.pluralName),\n columns: this.columns,\n rows: response?.data,\n hasHeaders: true,\n hasTextFilter: true,\n page: response?.meta?.current_page,\n perPage: response?.meta?.per_page,\n total: response?.meta?.total,\n onPage: (page: number) => this.list(page),\n };\n }\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 { RoutesComponent } from './routes.component';\n\n@NgModule({\n declarations: [RoutesComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: RoutesComponent }]),\n ],\n})\nexport class GroceryRoutesModule {}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AAkCM,MAAO,eAAgB,SAAQ,aAAa,CAAA;AAjClD,IAAA,WAAA,GAAA;;QAkCE,IAAA,CAAA,IAAI,GAAG,OAAO;QACd,IAAA,CAAA,UAAU,GAAG,QAAQ;QACrB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,oBAAoB,CAAC;AAErD,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,YAAA,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,4BAA4B,EAAE;AACtF,YAAA,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,mBAAmB,EAAE;SACrD;QAED,IAAA,CAAA,IAAI,GAAG,CAAC;QACR,IAAA,CAAA,OAAO,GAAG,EAAE;AAEZ,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,eAAe,CAAM,IAAI,CAAC;QAE7B,IAAA,CAAA,IAAI,GAAG,MAAK;YACnB,IAAI,CAAC,IAAI,EAAE;AACb,QAAA,CAAC;AAyBF,IAAA;IAvBC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,OAAO,EAAA;AAC3C,QAAA,IAAI,CAAC;AACF,aAAA,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE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,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGxD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAT/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,aAAa;AACb,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;AAClE,qBAAA;AACF,iBAAA;;;;;"}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/router';
|
|
4
|
-
import { RouterModule } from '@angular/router';
|
|
5
|
-
import { BaseDirective, titleCase, using, SharedModule } from '@thescaffold/ngx-core';
|
|
6
|
-
import * as i1$1 from '@thescaffold/ngx-ui';
|
|
7
|
-
import { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
|
|
8
|
-
import { BehaviorSubject, takeUntil, map } from 'rxjs';
|
|
9
|
-
import * as i2 from '@angular/common';
|
|
10
|
-
|
|
11
|
-
// P7.1 — ops console section pass (PRD 6.2, Settings). A single page that
|
|
12
|
-
// stacks the R1 configuration resources — channels, shipping zones,
|
|
13
|
-
// shipping methods, return policies — each as a standard
|
|
14
|
-
// `x-webget-collection` list. Users & roles is its own section
|
|
15
|
-
// (/admin/users); the audit log lands in P7.6. ops CRUD is covered by
|
|
16
|
-
// `admin:*:apps:commerce:*`.
|
|
17
|
-
class SettingsComponent extends BaseDirective {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...arguments);
|
|
20
|
-
this.sections = [
|
|
21
|
-
{
|
|
22
|
-
key: 'channels',
|
|
23
|
-
title: 'Channels',
|
|
24
|
-
mount: 'apps/commerce/channel',
|
|
25
|
-
columns: [
|
|
26
|
-
{ key: 'name', value: 'Name' },
|
|
27
|
-
{ key: 'code', value: 'Code' },
|
|
28
|
-
{ key: 'currency', value: 'Currency' },
|
|
29
|
-
],
|
|
30
|
-
data$: new BehaviorSubject(null),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
key: 'zones',
|
|
34
|
-
title: 'Shipping zones',
|
|
35
|
-
mount: 'apps/commerce/delivery-zone',
|
|
36
|
-
columns: [
|
|
37
|
-
{ key: 'name', value: 'Name' },
|
|
38
|
-
{ key: 'state', value: 'State' },
|
|
39
|
-
{ key: 'lga', value: 'LGA' },
|
|
40
|
-
],
|
|
41
|
-
data$: new BehaviorSubject(null),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
key: 'methods',
|
|
45
|
-
title: 'Shipping methods',
|
|
46
|
-
mount: 'apps/commerce/delivery-method',
|
|
47
|
-
columns: [
|
|
48
|
-
{ key: 'name', value: 'Name' },
|
|
49
|
-
{ key: 'flatFee', value: 'Flat fee' },
|
|
50
|
-
{ key: 'perKg', value: 'Per kg' },
|
|
51
|
-
{
|
|
52
|
-
key: 'enabled',
|
|
53
|
-
value: 'Enabled',
|
|
54
|
-
type: 'class',
|
|
55
|
-
class: 'badge text-bg-light border',
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
data$: new BehaviorSubject(null),
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: 'returns',
|
|
62
|
-
title: 'Return policies',
|
|
63
|
-
mount: 'apps/commerce/return-policy',
|
|
64
|
-
columns: [
|
|
65
|
-
{ key: 'windowDays', value: 'Window (days)' },
|
|
66
|
-
{ key: 'restockingFeePct', value: 'Restock fee %' },
|
|
67
|
-
{ key: 'whoPaysReturn', value: 'Who pays' },
|
|
68
|
-
{
|
|
69
|
-
key: 'enabled',
|
|
70
|
-
value: 'Enabled',
|
|
71
|
-
type: 'class',
|
|
72
|
-
class: 'badge text-bg-light border',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
data$: new BehaviorSubject(null),
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
this.active = this.sections[0].key;
|
|
79
|
-
this.init = () => {
|
|
80
|
-
for (const section of this.sections)
|
|
81
|
-
this.load(section);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
load(section) {
|
|
85
|
-
this.apiService
|
|
86
|
-
.on(section.mount)
|
|
87
|
-
.getMany({ page: 1, perPage: 100 })
|
|
88
|
-
.pipe(takeUntil(this.$), map((response) => ({
|
|
89
|
-
title: titleCase(section.title),
|
|
90
|
-
columns: section.columns,
|
|
91
|
-
rows: response?.data,
|
|
92
|
-
hasHeaders: true,
|
|
93
|
-
hasTextFilter: true,
|
|
94
|
-
total: response?.meta?.total,
|
|
95
|
-
})))
|
|
96
|
-
.subscribe(using((data) => section.data$.next(data)));
|
|
97
|
-
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: SettingsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: SettingsComponent, isStandalone: false, selector: "x-settings", usesInheritance: true, ngImport: i0, template: `
|
|
100
|
-
<div class="x-page-head">
|
|
101
|
-
<div class="x-page-title">Settings</div>
|
|
102
|
-
<div class="x-page-subtitle">
|
|
103
|
-
Channels, shipping, tax and returns configuration.
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<nav class="x-settings-tabs">
|
|
108
|
-
@for (s of sections; track s.key) {
|
|
109
|
-
<button
|
|
110
|
-
type="button"
|
|
111
|
-
class="x-settings-tab"
|
|
112
|
-
[class.is-active]="active === s.key"
|
|
113
|
-
(click)="active = s.key"
|
|
114
|
-
>
|
|
115
|
-
{{ s.title }}
|
|
116
|
-
</button>
|
|
117
|
-
}
|
|
118
|
-
</nav>
|
|
119
|
-
|
|
120
|
-
@for (s of sections; track s.key) {
|
|
121
|
-
@if (active === s.key) {
|
|
122
|
-
@if (s.data$ | async; as list) {
|
|
123
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
124
|
-
} @else {
|
|
125
|
-
<x-element-loader></x-element-loader>
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
<div class="x-settings-more">
|
|
131
|
-
<p>
|
|
132
|
-
<strong>Users & roles</strong> —
|
|
133
|
-
<a routerLink="/admin/users">manage accounts</a>.
|
|
134
|
-
</p>
|
|
135
|
-
<p>
|
|
136
|
-
<strong>Notifications</strong> — transactional and marketing templates
|
|
137
|
-
are seeded per environment (NotificationTemplates); per-customer
|
|
138
|
-
preferences are on the customer record.
|
|
139
|
-
</p>
|
|
140
|
-
<p class="x-settings-audit">
|
|
141
|
-
<strong>Audit log</strong> — every privileged action is recorded
|
|
142
|
-
(ntx-apps-audit); <a routerLink="/admin/audit">open the viewer</a>.
|
|
143
|
-
</p>
|
|
144
|
-
</div>
|
|
145
|
-
`, isInline: true, styles: [".x-page-head{margin-bottom:16px}.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-settings-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;border-bottom:1px solid var(--color-border)}.x-settings-tab{appearance:none;background:transparent;border:0;border-bottom:2px solid transparent;padding:8px 12px;font-size:13.5px;font-weight:600;color:var(--color-text-muted);cursor:pointer}.x-settings-tab.is-active{color:var(--color-text);border-bottom-color:var(--color-brand)}.x-settings-more{margin-top:28px;padding-top:18px;border-top:1px solid var(--color-border);font-size:13px;line-height:1.6;color:var(--color-text-muted)}.x-settings-more a{color:var(--color-brand)}.x-settings-audit{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i1$1.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
146
|
-
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: SettingsComponent, decorators: [{
|
|
148
|
-
type: Component,
|
|
149
|
-
args: [{ standalone: false, selector: 'x-settings', template: `
|
|
150
|
-
<div class="x-page-head">
|
|
151
|
-
<div class="x-page-title">Settings</div>
|
|
152
|
-
<div class="x-page-subtitle">
|
|
153
|
-
Channels, shipping, tax and returns configuration.
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<nav class="x-settings-tabs">
|
|
158
|
-
@for (s of sections; track s.key) {
|
|
159
|
-
<button
|
|
160
|
-
type="button"
|
|
161
|
-
class="x-settings-tab"
|
|
162
|
-
[class.is-active]="active === s.key"
|
|
163
|
-
(click)="active = s.key"
|
|
164
|
-
>
|
|
165
|
-
{{ s.title }}
|
|
166
|
-
</button>
|
|
167
|
-
}
|
|
168
|
-
</nav>
|
|
169
|
-
|
|
170
|
-
@for (s of sections; track s.key) {
|
|
171
|
-
@if (active === s.key) {
|
|
172
|
-
@if (s.data$ | async; as list) {
|
|
173
|
-
<x-webget-collection [data]="list"></x-webget-collection>
|
|
174
|
-
} @else {
|
|
175
|
-
<x-element-loader></x-element-loader>
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
<div class="x-settings-more">
|
|
181
|
-
<p>
|
|
182
|
-
<strong>Users & roles</strong> —
|
|
183
|
-
<a routerLink="/admin/users">manage accounts</a>.
|
|
184
|
-
</p>
|
|
185
|
-
<p>
|
|
186
|
-
<strong>Notifications</strong> — transactional and marketing templates
|
|
187
|
-
are seeded per environment (NotificationTemplates); per-customer
|
|
188
|
-
preferences are on the customer record.
|
|
189
|
-
</p>
|
|
190
|
-
<p class="x-settings-audit">
|
|
191
|
-
<strong>Audit log</strong> — every privileged action is recorded
|
|
192
|
-
(ntx-apps-audit); <a routerLink="/admin/audit">open the viewer</a>.
|
|
193
|
-
</p>
|
|
194
|
-
</div>
|
|
195
|
-
`, styles: [".x-page-head{margin-bottom:16px}.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-settings-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;border-bottom:1px solid var(--color-border)}.x-settings-tab{appearance:none;background:transparent;border:0;border-bottom:2px solid transparent;padding:8px 12px;font-size:13.5px;font-weight:600;color:var(--color-text-muted);cursor:pointer}.x-settings-tab.is-active{color:var(--color-text);border-bottom-color:var(--color-brand)}.x-settings-more{margin-top:28px;padding-top:18px;border-top:1px solid var(--color-border);font-size:13px;line-height:1.6;color:var(--color-text-muted)}.x-settings-more a{color:var(--color-brand)}.x-settings-audit{margin-bottom:0}\n"] }]
|
|
196
|
-
}] });
|
|
197
|
-
|
|
198
|
-
class SettingsModule {
|
|
199
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: SettingsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
200
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: SettingsModule, declarations: [SettingsComponent], imports: [SharedModule,
|
|
201
|
-
ElementsModule,
|
|
202
|
-
WebgetsModule, i1.RouterModule] }); }
|
|
203
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: SettingsModule, imports: [SharedModule,
|
|
204
|
-
ElementsModule,
|
|
205
|
-
WebgetsModule,
|
|
206
|
-
RouterModule.forChild([{ path: '', component: SettingsComponent }])] }); }
|
|
207
|
-
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: SettingsModule, decorators: [{
|
|
209
|
-
type: NgModule,
|
|
210
|
-
args: [{
|
|
211
|
-
declarations: [SettingsComponent],
|
|
212
|
-
imports: [
|
|
213
|
-
SharedModule,
|
|
214
|
-
ElementsModule,
|
|
215
|
-
WebgetsModule,
|
|
216
|
-
RouterModule.forChild([{ path: '', component: SettingsComponent }]),
|
|
217
|
-
],
|
|
218
|
-
}]
|
|
219
|
-
}] });
|
|
220
|
-
|
|
221
|
-
export { SettingsModule };
|
|
222
|
-
//# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs","sources":["../../../projects/admin/src/lib/pages/settings/settings.component.ts","../../../projects/admin/src/lib/pages/settings/settings.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, titleCase, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, map, takeUntil } from 'rxjs';\n\ninterface Section {\n key: string;\n title: string;\n mount: string;\n columns: { key: string; value: string; type?: string; class?: string }[];\n data$: BehaviorSubject<any>;\n}\n\n// P7.1 — ops console section pass (PRD 6.2, Settings). A single page that\n// stacks the R1 configuration resources — channels, shipping zones,\n// shipping methods, return policies — each as a standard\n// `x-webget-collection` list. Users & roles is its own section\n// (/admin/users); the audit log lands in P7.6. ops CRUD is covered by\n// `admin:*:apps:commerce:*`.\n@Component({\n standalone: false,\n selector: 'x-settings',\n template: `\n <div class=\"x-page-head\">\n <div class=\"x-page-title\">Settings</div>\n <div class=\"x-page-subtitle\">\n Channels, shipping, tax and returns configuration.\n </div>\n </div>\n\n <nav class=\"x-settings-tabs\">\n @for (s of sections; track s.key) {\n <button\n type=\"button\"\n class=\"x-settings-tab\"\n [class.is-active]=\"active === s.key\"\n (click)=\"active = s.key\"\n >\n {{ s.title }}\n </button>\n }\n </nav>\n\n @for (s of sections; track s.key) {\n @if (active === s.key) {\n @if (s.data$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n } @else {\n <x-element-loader></x-element-loader>\n }\n }\n }\n\n <div class=\"x-settings-more\">\n <p>\n <strong>Users & roles</strong> —\n <a routerLink=\"/admin/users\">manage accounts</a>.\n </p>\n <p>\n <strong>Notifications</strong> — transactional and marketing templates\n are seeded per environment (NotificationTemplates); per-customer\n preferences are on the customer record.\n </p>\n <p class=\"x-settings-audit\">\n <strong>Audit log</strong> — every privileged action is recorded\n (ntx-apps-audit); <a routerLink=\"/admin/audit\">open the viewer</a>.\n </p>\n </div>\n `,\n styles: [\n `\n .x-page-head {\n margin-bottom: 16px;\n }\n .x-page-title {\n font-size: 24px;\n font-weight: 800;\n color: var(--color-text);\n }\n .x-page-subtitle {\n font-size: 13.5px;\n color: var(--color-text-muted);\n margin-top: 2px;\n }\n .x-settings-tabs {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-bottom: 18px;\n border-bottom: 1px solid var(--color-border);\n }\n .x-settings-tab {\n appearance: none;\n background: transparent;\n border: 0;\n border-bottom: 2px solid transparent;\n padding: 8px 12px;\n font-size: 13.5px;\n font-weight: 600;\n color: var(--color-text-muted);\n cursor: pointer;\n }\n .x-settings-tab.is-active {\n color: var(--color-text);\n border-bottom-color: var(--color-brand);\n }\n .x-settings-more {\n margin-top: 28px;\n padding-top: 18px;\n border-top: 1px solid var(--color-border);\n font-size: 13px;\n line-height: 1.6;\n color: var(--color-text-muted);\n }\n .x-settings-more a {\n color: var(--color-brand);\n }\n .x-settings-audit {\n margin-bottom: 0;\n }\n `,\n ],\n})\nexport class SettingsComponent extends BaseDirective {\n readonly sections: Section[] = [\n {\n key: 'channels',\n title: 'Channels',\n mount: 'apps/commerce/channel',\n columns: [\n { key: 'name', value: 'Name' },\n { key: 'code', value: 'Code' },\n { key: 'currency', value: 'Currency' },\n ],\n data$: new BehaviorSubject<any>(null),\n },\n {\n key: 'zones',\n title: 'Shipping zones',\n mount: 'apps/commerce/delivery-zone',\n columns: [\n { key: 'name', value: 'Name' },\n { key: 'state', value: 'State' },\n { key: 'lga', value: 'LGA' },\n ],\n data$: new BehaviorSubject<any>(null),\n },\n {\n key: 'methods',\n title: 'Shipping methods',\n mount: 'apps/commerce/delivery-method',\n columns: [\n { key: 'name', value: 'Name' },\n { key: 'flatFee', value: 'Flat fee' },\n { key: 'perKg', value: 'Per kg' },\n {\n key: 'enabled',\n value: 'Enabled',\n type: 'class',\n class: 'badge text-bg-light border',\n },\n ],\n data$: new BehaviorSubject<any>(null),\n },\n {\n key: 'returns',\n title: 'Return policies',\n mount: 'apps/commerce/return-policy',\n columns: [\n { key: 'windowDays', value: 'Window (days)' },\n { key: 'restockingFeePct', value: 'Restock fee %' },\n { key: 'whoPaysReturn', value: 'Who pays' },\n {\n key: 'enabled',\n value: 'Enabled',\n type: 'class',\n class: 'badge text-bg-light border',\n },\n ],\n data$: new BehaviorSubject<any>(null),\n },\n ];\n\n active = this.sections[0].key;\n\n override init = () => {\n for (const section of this.sections) this.load(section);\n };\n\n private load(section: Section): void {\n this.apiService\n .on(section.mount)\n .getMany({ page: 1, perPage: 100 })\n .pipe(\n takeUntil(this.$),\n map((response: any) => ({\n title: titleCase(section.title),\n columns: section.columns,\n rows: response?.data,\n hasHeaders: true,\n hasTextFilter: true,\n total: response?.meta?.total,\n })),\n )\n .subscribe(using((data) => section.data$.next(data)));\n }\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 { SettingsComponent } from './settings.component';\n\n@NgModule({\n declarations: [SettingsComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterMod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