@rolatech/angular-inventory 19.0.0-beta.9 → 19.1.0-beta.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/{rolatech-angular-inventory-inventory-product.component-BUgsJPb_.mjs → rolatech-angular-inventory-inventory-product.component-007OyNdV.mjs} +9 -9
- package/fesm2022/rolatech-angular-inventory-inventory-product.component-007OyNdV.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-inventory-inventory.component-B0SQ9yVQ.mjs → rolatech-angular-inventory-inventory.component-BM6WZg6s.mjs} +4 -4
- package/fesm2022/rolatech-angular-inventory-inventory.component-BM6WZg6s.mjs.map +1 -0
- package/fesm2022/rolatech-angular-inventory-rolatech-angular-inventory-BS0EXGoZ.mjs +360 -0
- package/fesm2022/rolatech-angular-inventory-rolatech-angular-inventory-BS0EXGoZ.mjs.map +1 -0
- package/fesm2022/rolatech-angular-inventory.mjs +1 -1
- package/index.d.ts +67 -4
- package/package.json +1 -1
- package/themes/_default.scss +1 -1
- package/fesm2022/rolatech-angular-inventory-inventory-product.component-BUgsJPb_.mjs.map +0 -1
- package/fesm2022/rolatech-angular-inventory-inventory.component-B0SQ9yVQ.mjs.map +0 -1
- package/fesm2022/rolatech-angular-inventory-rolatech-angular-inventory-DdvT0yRK.mjs +0 -361
- package/fesm2022/rolatech-angular-inventory-rolatech-angular-inventory-DdvT0yRK.mjs.map +0 -1
- package/lib/components/inventory-content/inventory-content.component.d.ts +0 -5
- package/lib/components/inventory-layout/inventory-layout.component.d.ts +0 -5
- package/lib/components/inventory-location-item/inventory-location-item.component.d.ts +0 -14
- package/lib/components/inventory-location-map/inventory-location-map.component.d.ts +0 -29
- package/lib/components/inventory-product-item/inventory-product-item.component.d.ts +0 -14
- package/lib/interfaces/inventory-location.d.ts +0 -27
- package/lib/pages/inventory/inventory.component.d.ts +0 -5
- package/lib/pages/inventory-location/inventory-location.component.d.ts +0 -13
- package/lib/pages/inventory-location-add/inventory-location-add.component.d.ts +0 -11
- package/lib/pages/inventory-location-detail/inventory-location-detail.component.d.ts +0 -15
- package/lib/pages/inventory-product/inventory-product.component.d.ts +0 -14
- package/lib/pages/inventory.routes.d.ts +0 -2
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, model, ViewEncapsulation, Component, inject } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { ThumbnailComponent, AngularComponentsModule, ImagePlaceholderComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
|
|
5
|
-
import { I as InventoryContentComponent } from './rolatech-angular-inventory-rolatech-angular-inventory-
|
|
5
|
+
import { I as InventoryContentComponent } from './rolatech-angular-inventory-rolatech-angular-inventory-BS0EXGoZ.mjs';
|
|
6
6
|
import { InventoryService, ProductService } from '@rolatech/angular-services';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { AngularCommonModule } from '@rolatech/angular-common';
|
|
@@ -13,12 +13,12 @@ class InventoryProductItemComponent {
|
|
|
13
13
|
this.product = input.required();
|
|
14
14
|
this.amount = model();
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryProductItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: InventoryProductItemComponent, isStandalone: true, selector: "rolatech-inventory-product-item", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, amount: { classPropertyName: "amount", publicName: "amount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { amount: "amountChange" }, ngImport: i0, template: "<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: ImagePlaceholderComponent, selector: "rolatech-image-placeholder" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [ThumbnailComponent]] }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryProductItemComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
|
-
args: [{ selector: 'rolatech-inventory-product-item', imports: [AngularCommonModule, AngularComponentsModule, ThumbnailComponent, ImagePlaceholderComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n
|
|
21
|
+
args: [{ selector: 'rolatech-inventory-product-item', imports: [AngularCommonModule, AngularComponentsModule, ThumbnailComponent, ImagePlaceholderComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n</div>\n" }]
|
|
22
22
|
}] });
|
|
23
23
|
|
|
24
24
|
class InventoryProductComponent extends BaseComponent {
|
|
@@ -46,13 +46,13 @@ class InventoryProductComponent extends BaseComponent {
|
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: InventoryProductComponent, isStandalone: true, selector: "rolatech-inventory-product", usesInheritance: true, ngImport: i0, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InventoryContentComponent, selector: "rolatech-inventory-content" }, { kind: "component", type: InventoryProductItemComponent, selector: "rolatech-inventory-product-item", inputs: ["product", "amount"], outputs: ["amountChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
51
51
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryProductComponent, decorators: [{
|
|
53
53
|
type: Component,
|
|
54
54
|
args: [{ selector: 'rolatech-inventory-product', imports: [CommonModule, ToolbarComponent, InventoryContentComponent, InventoryProductItemComponent, RouterLink], encapsulation: ViewEncapsulation.None, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n" }]
|
|
55
55
|
}] });
|
|
56
56
|
|
|
57
57
|
export { InventoryProductComponent };
|
|
58
|
-
//# sourceMappingURL=rolatech-angular-inventory-inventory-product.component-
|
|
58
|
+
//# sourceMappingURL=rolatech-angular-inventory-inventory-product.component-007OyNdV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-inventory-inventory-product.component-007OyNdV.mjs","sources":["../tmp-esm2022/lib/components/inventory-product-item/inventory-product-item.component.js","../tmp-esm2022/lib/pages/inventory-product/inventory-product.component.js"],"sourcesContent":["import { Component, input, model, ViewEncapsulation } from '@angular/core';\nimport { AngularComponentsModule, ImagePlaceholderComponent, ThumbnailComponent } from '@rolatech/angular-components';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport * as i0 from \"@angular/core\";\nexport class InventoryProductItemComponent {\n constructor() {\n this.product = input.required();\n this.amount = model();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryProductItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.0.3\", type: InventoryProductItemComponent, isStandalone: true, selector: \"rolatech-inventory-product-item\", inputs: { product: { classPropertyName: \"product\", publicName: \"product\", isSignal: true, isRequired: true, transformFunction: null }, amount: { classPropertyName: \"amount\", publicName: \"amount\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { amount: \"amountChange\" }, ngImport: i0, template: \"<div class=\\\"flex items-center p-2 justify-between\\\">\\n <div class=\\\"flex\\\">\\n @if (product().media) {\\n <div class=\\\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\\\">\\n @defer (on viewport()) {\\n <rolatech-thumbnail [src]=\\\"product().media[0].url + '!w400'\\\" size=\\\"medium\\\" mode=\\\"full\\\"> </rolatech-thumbnail>\\n } @placeholder {\\n <div class=\\\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\\\"></div>\\n }\\n </div>\\n } @else {\\n <div class=\\\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\\\">\\n <rolatech-image-placeholder></rolatech-image-placeholder>\\n </div>\\n }\\n <div>{{ product().name }}</div>\\n </div>\\n</div>\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: AngularCommonModule }, { kind: \"ngmodule\", type: AngularComponentsModule }, { kind: \"component\", type: ImagePlaceholderComponent, selector: \"rolatech-image-placeholder\" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [ThumbnailComponent]] }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryProductItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'rolatech-inventory-product-item', imports: [AngularCommonModule, AngularComponentsModule, ThumbnailComponent, ImagePlaceholderComponent], encapsulation: ViewEncapsulation.None, template: \"<div class=\\\"flex items-center p-2 justify-between\\\">\\n <div class=\\\"flex\\\">\\n @if (product().media) {\\n <div class=\\\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\\\">\\n @defer (on viewport()) {\\n <rolatech-thumbnail [src]=\\\"product().media[0].url + '!w400'\\\" size=\\\"medium\\\" mode=\\\"full\\\"> </rolatech-thumbnail>\\n } @placeholder {\\n <div class=\\\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\\\"></div>\\n }\\n </div>\\n } @else {\\n <div class=\\\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\\\">\\n <rolatech-image-placeholder></rolatech-image-placeholder>\\n </div>\\n }\\n <div>{{ product().name }}</div>\\n </div>\\n</div>\\n\" }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52ZW50b3J5LXByb2R1Y3QtaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdl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AgIDxkaXY+e3sgcHJvZHVjdCgpLm5hbWUgfX08L2Rpdj5cbiAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==","import { Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { InventoryContentComponent } from '../../components/inventory-content/inventory-content.component';\nimport { InventoryService, ProductService } from '@rolatech/angular-services';\nimport _ from 'lodash';\nimport { InventoryProductItemComponent } from '../../components/inventory-product-item/inventory-product-item.component';\nimport { RouterLink } from '@angular/router';\nimport * as i0 from \"@angular/core\";\nexport class InventoryProductComponent extends BaseComponent {\n constructor() {\n super(...arguments);\n this.inventoryService = inject(InventoryService);\n this.productService = inject(ProductService);\n this.products = [];\n }\n ngOnInit() {\n this.findInventoryItem();\n }\n findInventoryItem() {\n this.inventoryService.findMyInventoryItems({}).subscribe({\n next: (res) => {\n const productIds = _.uniq(_.map(res.data, 'productId'));\n this.findProductsByIds(productIds);\n },\n });\n }\n findProductsByIds(ids) {\n this.productService.findByIds(ids).subscribe({\n next: (res) => {\n this.products = res.data;\n },\n });\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.0.3\", type: InventoryProductComponent, isStandalone: true, selector: \"rolatech-inventory-product\", usesInheritance: true, ngImport: i0, template: \"<rolatech-inventory-content>\\n <rolatech-toolbar title=\\\"\\u5546\\u54C1\\u5E93\\u5B58\\\" class=\\\"hidden md:block\\\" divider></rolatech-toolbar>\\n <div class=\\\"divide-y divide-[--rt-10-percent-layer]\\\">\\n @for (item of products; track $index) {\\n <rolatech-inventory-product-item\\n class=\\\"block cursor-pointer hover:bg-[--rt-raised-background]\\\"\\n [product]=\\\"item\\\"\\n [routerLink]=\\\"['/products', item.id, 'manage', 'inventory']\\\"\\n ></rolatech-inventory-product-item>\\n }\\n </div>\\n</rolatech-inventory-content>\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"component\", type: ToolbarComponent, selector: \"rolatech-toolbar\", inputs: [\"title\", \"subtitle\", \"back\", \"link\", \"large\", \"divider\"] }, { kind: \"component\", type: InventoryContentComponent, selector: \"rolatech-inventory-content\" }, { kind: \"component\", type: InventoryProductItemComponent, selector: \"rolatech-inventory-product-item\", inputs: [\"product\", \"amount\"], outputs: [\"amountChange\"] }, { kind: \"directive\", type: RouterLink, selector: \"[routerLink]\", inputs: [\"target\", \"queryParams\", \"fragment\", \"queryParamsHandling\", \"state\", \"info\", \"relativeTo\", \"preserveFragment\", \"skipLocationChange\", \"replaceUrl\", \"routerLink\"] }], encapsulation: i0.ViewEncapsulation.None }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryProductComponent, decorators: [{\n type: Component,\n args: [{ selector: 'rolatech-inventory-product', imports: [CommonModule, ToolbarComponent, InventoryContentComponent, InventoryProductItemComponent, RouterLink], encapsulation: ViewEncapsulation.None, template: \"<rolatech-inventory-content>\\n <rolatech-toolbar title=\\\"\\u5546\\u54C1\\u5E93\\u5B58\\\" class=\\\"hidden md:block\\\" divider></rolatech-toolbar>\\n <div class=\\\"divide-y divide-[--rt-10-percent-layer]\\\">\\n @for (item of products; track $index) {\\n <rolatech-inventory-product-item\\n class=\\\"block cursor-pointer hover:bg-[--rt-raised-background]\\\"\\n [product]=\\\"item\\\"\\n [routerLink]=\\\"['/products', item.id, 'manage', 'inventory']\\\"\\n ></rolatech-inventory-product-item>\\n }\\n </div>\\n</rolatech-inventory-content>\\n\" }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52ZW50b3J5LXByb2R1Y3QuY29tcG9uZW50LmpzIiwic291cmNlUm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,cAAc,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;AACtgD;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC;AACnI,YAAY,IAAI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,UAAU,CAAC,EAAE,aAAa,EAAE,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,uiBAAuiB,EAAE;AACxwB,SAAS,CAAC,EAAE,CAAC;;;;"}
|
|
@@ -3,13 +3,13 @@ import { ViewEncapsulation, Component } from '@angular/core';
|
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
class InventoryComponent {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: InventoryComponent, isStandalone: true, selector: "rolatech-inventory", ngImport: i0, template: "<p>inventory works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'rolatech-inventory', imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<p>inventory works!</p>\n" }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
export { InventoryComponent };
|
|
15
|
-
//# sourceMappingURL=rolatech-angular-inventory-inventory.component-
|
|
15
|
+
//# sourceMappingURL=rolatech-angular-inventory-inventory.component-BM6WZg6s.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-inventory-inventory.component-BM6WZg6s.mjs","sources":["../tmp-esm2022/lib/pages/inventory/inventory.component.js"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from \"@angular/core\";\nexport class InventoryComponent {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.3\", type: InventoryComponent, isStandalone: true, selector: \"rolatech-inventory\", ngImport: i0, template: \"<p>inventory works!</p>\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: InventoryComponent, decorators: [{\n type: Component,\n args: [{ selector: 'rolatech-inventory', imports: [CommonModule], encapsulation: ViewEncapsulation.None, template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AI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,aAAa,EAAE,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,2BAA2B,EAAE;AAC5J,SAAS,CAAC,EAAE,CAAC;;;;"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ViewEncapsulation, Component, inject, Inject, input, output } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/router';
|
|
5
|
+
import { RouterModule, RouterLink } from '@angular/router';
|
|
6
|
+
import { ToolbarComponent, TitleComponent, BaseComponent } from '@rolatech/angular-components';
|
|
7
|
+
import { InventoryService } from '@rolatech/angular-services';
|
|
8
|
+
import * as i6 from '@angular/material/icon';
|
|
9
|
+
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
10
|
+
import * as i5 from '@angular/material/button';
|
|
11
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
+
import * as i3$1 from '@angular/cdk/text-field';
|
|
13
|
+
import { TextFieldModule } from '@angular/cdk/text-field';
|
|
14
|
+
import * as i1$2 from '@angular/forms';
|
|
15
|
+
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
17
|
+
import * as i2 from '@angular/material/form-field';
|
|
18
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
19
|
+
import * as i5$1 from '@angular/material/input';
|
|
20
|
+
import { MatInputModule } from '@angular/material/input';
|
|
21
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
22
|
+
import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatDialog } from '@angular/material/dialog';
|
|
23
|
+
import { MatOptionModule } from '@angular/material/core';
|
|
24
|
+
import * as i3 from '@angular/material/select';
|
|
25
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
26
|
+
|
|
27
|
+
class InventoryLayoutComponent {
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: InventoryLayoutComponent, isStandalone: true, selector: "rolatech-inventory-layout", ngImport: i0, template: "<div class=\"flex flex-col md:flex-row m-auto\">\n <div\n class=\"min-w-[256px] px-3 md:px-0 flex flex-row md:flex-col md:h-full items-center md:items-start h-16 overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\" i18n>\u5E93\u5B58\u8BBE\u7F6E</div>\n <a routerLink=\"./locations\" routerLinkActive=\"manage-active\" class=\"p-2\" i18n>\u4ED3\u5E93\u8BBE\u7F6E</a>\n </div>\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\" i18n>\u5546\u54C1\u5E93\u5B58</div>\n <a routerLink=\"./products\" routerLinkActive=\"manage-active\" class=\"p-2\" i18n>\u5546\u54C1</a>\n <!-- <a routerLink=\"./inventory\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5E93\u5B58\u8BBE\u7F6E</a> -->\n </div>\n </div>\n <div class=\"w-full\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".manage-active{background-color:var(--rt-10-percent-layer, rgba(0, 0, 0, .05));box-shadow:4px 0 var(--rt-base-background-inverse, #000) inset;font-weight:600}@media (max-width: 768px){.manage-active{box-shadow:inset 0 -4px 0 0 var(--rt-base-background-inverse, #000)}}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLayoutComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{ selector: 'rolatech-inventory-layout', imports: [CommonModule, RouterModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col md:flex-row m-auto\">\n <div\n class=\"min-w-[256px] px-3 md:px-0 flex flex-row md:flex-col md:h-full items-center md:items-start h-16 overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\" i18n>\u5E93\u5B58\u8BBE\u7F6E</div>\n <a routerLink=\"./locations\" routerLinkActive=\"manage-active\" class=\"p-2\" i18n>\u4ED3\u5E93\u8BBE\u7F6E</a>\n </div>\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\" i18n>\u5546\u54C1\u5E93\u5B58</div>\n <a routerLink=\"./products\" routerLinkActive=\"manage-active\" class=\"p-2\" i18n>\u5546\u54C1</a>\n <!-- <a routerLink=\"./inventory\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5E93\u5B58\u8BBE\u7F6E</a> -->\n </div>\n </div>\n <div class=\"w-full\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".manage-active{background-color:var(--rt-10-percent-layer, rgba(0, 0, 0, .05));box-shadow:4px 0 var(--rt-base-background-inverse, #000) inset;font-weight:600}@media (max-width: 768px){.manage-active{box-shadow:inset 0 -4px 0 0 var(--rt-base-background-inverse, #000)}}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"] }]
|
|
34
|
+
}] });
|
|
35
|
+
|
|
36
|
+
const inventoryRoutes = [
|
|
37
|
+
{
|
|
38
|
+
path: '',
|
|
39
|
+
component: InventoryLayoutComponent,
|
|
40
|
+
children: [
|
|
41
|
+
{
|
|
42
|
+
path: '',
|
|
43
|
+
loadComponent: () => import('./rolatech-angular-inventory-inventory.component-BM6WZg6s.mjs').then((c) => c.InventoryComponent),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: 'locations',
|
|
47
|
+
loadComponent: () => Promise.resolve().then(function () { return inventoryLocation_component; }).then((c) => c.InventoryLocationComponent),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: 'locations/add',
|
|
51
|
+
loadComponent: () => Promise.resolve().then(function () { return inventoryLocationAdd_component; }).then((c) => c.InventoryLocationAddComponent),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
path: 'locations/:id',
|
|
55
|
+
loadComponent: () => Promise.resolve().then(function () { return inventoryLocationDetail_component; }).then((c) => c.InventoryLocationDetailComponent),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: 'products',
|
|
59
|
+
loadComponent: () => import('./rolatech-angular-inventory-inventory-product.component-007OyNdV.mjs').then((c) => c.InventoryProductComponent),
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
class InventoryContentComponent {
|
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: InventoryContentComponent, isStandalone: true, selector: "rolatech-inventory-content", ngImport: i0, template: "<ng-content select=\"rolatech-toolbar\"></ng-content>\n<div class=\"p-3\">\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryContentComponent, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'rolatech-inventory-content', imports: [CommonModule], template: "<ng-content select=\"rolatech-toolbar\"></ng-content>\n<div class=\"p-3\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
72
|
+
}] });
|
|
73
|
+
|
|
74
|
+
class InventoryLocationComponent {
|
|
75
|
+
constructor() {
|
|
76
|
+
this.inventoryService = inject(InventoryService);
|
|
77
|
+
this.locations = [];
|
|
78
|
+
}
|
|
79
|
+
ngOnInit() {
|
|
80
|
+
this.findLocations();
|
|
81
|
+
}
|
|
82
|
+
findLocations() {
|
|
83
|
+
this.inventoryService.findLocations({}).subscribe({
|
|
84
|
+
next: (res) => {
|
|
85
|
+
this.locations = res.data;
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
addLocation(data) {
|
|
90
|
+
this.inventoryService.addLocation(data);
|
|
91
|
+
}
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: InventoryLocationComponent, isStandalone: true, selector: "rolatech-inventory-location", ngImport: i0, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"Inventory location\" class=\"hidden md:block\" divider>\n <div class=\"flex items-center gap-2\">\n <button mat-stroked-button routerLink=\"./add\">\n <mat-icon>add</mat-icon>\n <span i18n>Create inventory</span>\n </button>\n </div>\n </rolatech-toolbar>\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\n @for (item of locations; track $index) {\n <div [routerLink]=\"item.id\" class=\"flex items-center px-2 h-11 hover:cursor-pointer hover:bg-[--rt-raised-background]\">\n <div class=\"font-bold\">{{ item.name }}</div>\n <div></div>\n </div>\n }\n </div>\n</rolatech-inventory-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InventoryContentComponent, selector: "rolatech-inventory-content" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationComponent, decorators: [{
|
|
96
|
+
type: Component,
|
|
97
|
+
args: [{ selector: 'rolatech-inventory-location', imports: [CommonModule, ToolbarComponent, InventoryContentComponent, RouterLink, MatButtonModule, MatIcon], template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"Inventory location\" class=\"hidden md:block\" divider>\n <div class=\"flex items-center gap-2\">\n <button mat-stroked-button routerLink=\"./add\">\n <mat-icon>add</mat-icon>\n <span i18n>Create inventory</span>\n </button>\n </div>\n </rolatech-toolbar>\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\n @for (item of locations; track $index) {\n <div [routerLink]=\"item.id\" class=\"flex items-center px-2 h-11 hover:cursor-pointer hover:bg-[--rt-raised-background]\">\n <div class=\"font-bold\">{{ item.name }}</div>\n <div></div>\n </div>\n }\n </div>\n</rolatech-inventory-content>\n" }]
|
|
98
|
+
}] });
|
|
99
|
+
|
|
100
|
+
var inventoryLocation_component = /*#__PURE__*/Object.freeze({
|
|
101
|
+
__proto__: null,
|
|
102
|
+
InventoryLocationComponent: InventoryLocationComponent
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
class InventoryLocationMapComponent {
|
|
106
|
+
constructor(dialogRef, data) {
|
|
107
|
+
this.dialogRef = dialogRef;
|
|
108
|
+
this.data = data;
|
|
109
|
+
this.infoWindowList = Array(10);
|
|
110
|
+
this.cities = ['北京', '上海'];
|
|
111
|
+
this.region = '北京';
|
|
112
|
+
}
|
|
113
|
+
ngOnInit() {
|
|
114
|
+
this.init();
|
|
115
|
+
}
|
|
116
|
+
init() {
|
|
117
|
+
const map = new window.TMap.Map(document.getElementById('map-container'), {
|
|
118
|
+
// 地图的中心地理坐标。
|
|
119
|
+
center: new window.TMap.LatLng(40.0402718, 116.2735831),
|
|
120
|
+
resizeEnable: true,
|
|
121
|
+
zoom: 14,
|
|
122
|
+
});
|
|
123
|
+
const markers = new window.TMap.MultiMarker({
|
|
124
|
+
map: map,
|
|
125
|
+
geometries: [],
|
|
126
|
+
});
|
|
127
|
+
this.map = map;
|
|
128
|
+
this.markers = markers;
|
|
129
|
+
}
|
|
130
|
+
onSearchChange(event) {
|
|
131
|
+
const value = event.target.value;
|
|
132
|
+
const suggest = new window.TMap.service.Suggestion({
|
|
133
|
+
pageSize: 15, // 返回结果每页条目数
|
|
134
|
+
region: this.region, // 限制城市范围
|
|
135
|
+
regionFix: true, // 搜索无结果时是否固定在当前城市
|
|
136
|
+
});
|
|
137
|
+
if (value) {
|
|
138
|
+
suggest
|
|
139
|
+
.getSuggestions({ keyword: value, location: this.map.getCenter() })
|
|
140
|
+
.then((result) => {
|
|
141
|
+
this.lists = result.data;
|
|
142
|
+
})
|
|
143
|
+
.catch((error) => { });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
setLocation(index) {
|
|
147
|
+
this.infoWindowList.forEach((infoWindow) => {
|
|
148
|
+
infoWindow.close();
|
|
149
|
+
});
|
|
150
|
+
this.infoWindowList.length = 0;
|
|
151
|
+
const item = this.lists[index];
|
|
152
|
+
this.selectedLocation = item;
|
|
153
|
+
this.lists = [];
|
|
154
|
+
this.markers.setGeometries([]);
|
|
155
|
+
this.markers.updateGeometries([
|
|
156
|
+
{
|
|
157
|
+
id: '0', // 点标注数据数组
|
|
158
|
+
position: item.location,
|
|
159
|
+
},
|
|
160
|
+
]);
|
|
161
|
+
const infoWindow = new window.TMap.InfoWindow({
|
|
162
|
+
map: this.map,
|
|
163
|
+
position: item.location,
|
|
164
|
+
content: `<h3>${item.title}</h3><p>地址:${item.address}</p>`,
|
|
165
|
+
offset: { x: 0, y: -50 },
|
|
166
|
+
});
|
|
167
|
+
this.infoWindowList.push(infoWindow);
|
|
168
|
+
this.map.setCenter(item.location);
|
|
169
|
+
this.markers.on('click', (e) => {
|
|
170
|
+
this.infoWindowList[Number(e.geometry.id)].open();
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
onNoClick() {
|
|
174
|
+
this.dialogRef.close();
|
|
175
|
+
}
|
|
176
|
+
selectionChange(event) { }
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationMapComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
178
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: InventoryLocationMapComponent, isStandalone: true, selector: "rolatech-inventory-location-map", ngImport: i0, template: "@if (data.title) {\n <h2 mat-dialog-title>{{ data.title }}</h2>\n}\n<div mat-dialog-content>\n <div class=\"h-full\">\n <div class=\"relative h-full\">\n <div id=\"map-container\" class=\"h-full\"></div>\n <div class=\"absolute bg-white z-[9999] top-[30px] left-[30px]\">\n <div class=\"flex gap-3 px-3 pt-3\">\n <mat-form-field appearance=\"fill\" [style.width.px]=\"180\">\n <mat-label i18n>City</mat-label>\n <mat-select #select=\"matSelect\" [(ngModel)]=\"region\" (selectionChange)=\"selectionChange($event)\">\n @for (city of cities; track city) {\n <mat-option [value]=\"city\">\n {{ city }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22\" (input)=\"onSearchChange($event)\" />\n </mat-form-field>\n </div>\n <div class=\"max-h-[320px] overflow-scroll pb-3 bg-white\">\n @for (item of lists; track item; let index = $index) {\n <div (click)=\"setLocation(index)\" class=\"cursor-pointer\">\n <div class=\"p-3 flex items-center gap-2 hover:bg-[--rt-raised-background]\">\n <mat-icon fontIcon=\"location_on\"></mat-icon>\n <div class=\"text-sm font-thin\">{{ item.title }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-button mat-dialog-close i18n>Cancel</button>\n <button mat-flat-button [mat-dialog-close]=\"selectedLocation\" cdkFocusInitial i18n>Ok</button>\n</div>\n", styles: ["mat-form-field{width:100%;margin-bottom:-1.25em}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] }); }
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationMapComponent, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{ selector: 'rolatech-inventory-location-map', imports: [
|
|
183
|
+
MatDialogTitle,
|
|
184
|
+
MatDialogContent,
|
|
185
|
+
MatFormFieldModule,
|
|
186
|
+
MatSelectModule,
|
|
187
|
+
FormsModule,
|
|
188
|
+
MatOptionModule,
|
|
189
|
+
MatInputModule,
|
|
190
|
+
MatIconModule,
|
|
191
|
+
MatDialogActions,
|
|
192
|
+
MatButtonModule,
|
|
193
|
+
MatDialogClose,
|
|
194
|
+
], template: "@if (data.title) {\n <h2 mat-dialog-title>{{ data.title }}</h2>\n}\n<div mat-dialog-content>\n <div class=\"h-full\">\n <div class=\"relative h-full\">\n <div id=\"map-container\" class=\"h-full\"></div>\n <div class=\"absolute bg-white z-[9999] top-[30px] left-[30px]\">\n <div class=\"flex gap-3 px-3 pt-3\">\n <mat-form-field appearance=\"fill\" [style.width.px]=\"180\">\n <mat-label i18n>City</mat-label>\n <mat-select #select=\"matSelect\" [(ngModel)]=\"region\" (selectionChange)=\"selectionChange($event)\">\n @for (city of cities; track city) {\n <mat-option [value]=\"city\">\n {{ city }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22\" (input)=\"onSearchChange($event)\" />\n </mat-form-field>\n </div>\n <div class=\"max-h-[320px] overflow-scroll pb-3 bg-white\">\n @for (item of lists; track item; let index = $index) {\n <div (click)=\"setLocation(index)\" class=\"cursor-pointer\">\n <div class=\"p-3 flex items-center gap-2 hover:bg-[--rt-raised-background]\">\n <mat-icon fontIcon=\"location_on\"></mat-icon>\n <div class=\"text-sm font-thin\">{{ item.title }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-button mat-dialog-close i18n>Cancel</button>\n <button mat-flat-button [mat-dialog-close]=\"selectedLocation\" cdkFocusInitial i18n>Ok</button>\n</div>\n", styles: ["mat-form-field{width:100%;margin-bottom:-1.25em}\n"] }]
|
|
195
|
+
}], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
|
|
196
|
+
type: Inject,
|
|
197
|
+
args: [MAT_DIALOG_DATA]
|
|
198
|
+
}] }] });
|
|
199
|
+
|
|
200
|
+
class InventoryLocationItemComponent {
|
|
201
|
+
constructor() {
|
|
202
|
+
this.location = input.required();
|
|
203
|
+
this.dialog = inject(MatDialog);
|
|
204
|
+
this.save = output();
|
|
205
|
+
this.delete = output();
|
|
206
|
+
}
|
|
207
|
+
selectLocation() {
|
|
208
|
+
const dialogRef = this.dialog.open(InventoryLocationMapComponent, {
|
|
209
|
+
width: '90%',
|
|
210
|
+
data: {
|
|
211
|
+
title: '选择位置',
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
215
|
+
if (result) {
|
|
216
|
+
const address = result.address;
|
|
217
|
+
const { lat, lng } = result.location;
|
|
218
|
+
this.location().detail = address;
|
|
219
|
+
this.location().latitude = lat;
|
|
220
|
+
this.location().longitude = lng;
|
|
221
|
+
this.location().province = result.province;
|
|
222
|
+
this.location().city = result.city;
|
|
223
|
+
this.location().district = result.district;
|
|
224
|
+
this.location().detail = result.title;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
onSave() {
|
|
229
|
+
this.save.emit(this.location());
|
|
230
|
+
}
|
|
231
|
+
onDelete() {
|
|
232
|
+
this.delete.emit(this.location());
|
|
233
|
+
}
|
|
234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
235
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.3", type: InventoryLocationItemComponent, isStandalone: true, selector: "rolatech-inventory-location-item", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { save: "save", delete: "delete" }, ngImport: i0, template: "<div class=\"mb-8\">\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput [(ngModel)]=\"location().name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Contact </mat-label>\n <input matInput [(ngModel)]=\"location().contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"location().phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <rolatech-title title=\"Location info\"></rolatech-title>\n <button mat-stroked-button (click)=\"selectLocation()\" i18n>Select location</button>\n </div>\n <div class=\"flex flex-row gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Province </mat-label>\n <input matInput [(ngModel)]=\"location().province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> City </mat-label>\n <input matInput [(ngModel)]=\"location().city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n>District </mat-label>\n <input matInput [(ngModel)]=\"location().district\" name=\"district\" required disabled />\n </mat-form-field>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Address </mat-label>\n <input matInput [(ngModel)]=\"location().street\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Details </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location().detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n <div>\n <button mat-button (click)=\"onDelete()\" i18n>Delete</button>\n <button mat-flat-button (click)=\"onSave()\" i18n>Save</button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: TitleComponent, selector: "rolatech-title", inputs: ["title", "subtitle", "large"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
236
|
+
}
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationItemComponent, decorators: [{
|
|
238
|
+
type: Component,
|
|
239
|
+
args: [{ selector: 'rolatech-inventory-location-item', imports: [
|
|
240
|
+
MatFormFieldModule,
|
|
241
|
+
MatInputModule,
|
|
242
|
+
FormsModule,
|
|
243
|
+
MatButtonModule,
|
|
244
|
+
TextFieldModule,
|
|
245
|
+
MatDividerModule,
|
|
246
|
+
TitleComponent,
|
|
247
|
+
], encapsulation: ViewEncapsulation.None, template: "<div class=\"mb-8\">\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput [(ngModel)]=\"location().name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Contact </mat-label>\n <input matInput [(ngModel)]=\"location().contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"location().phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <rolatech-title title=\"Location info\"></rolatech-title>\n <button mat-stroked-button (click)=\"selectLocation()\" i18n>Select location</button>\n </div>\n <div class=\"flex flex-row gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Province </mat-label>\n <input matInput [(ngModel)]=\"location().province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> City </mat-label>\n <input matInput [(ngModel)]=\"location().city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n>District </mat-label>\n <input matInput [(ngModel)]=\"location().district\" name=\"district\" required disabled />\n </mat-form-field>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Address </mat-label>\n <input matInput [(ngModel)]=\"location().street\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Details </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location().detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n <div>\n <button mat-button (click)=\"onDelete()\" i18n>Delete</button>\n <button mat-flat-button (click)=\"onSave()\" i18n>Save</button>\n </div>\n </div>\n</div>\n" }]
|
|
248
|
+
}] });
|
|
249
|
+
|
|
250
|
+
class InventoryLocationDetailComponent extends BaseComponent {
|
|
251
|
+
constructor() {
|
|
252
|
+
super(...arguments);
|
|
253
|
+
this.inventoryService = inject(InventoryService);
|
|
254
|
+
}
|
|
255
|
+
ngOnInit() {
|
|
256
|
+
this.get();
|
|
257
|
+
}
|
|
258
|
+
get() {
|
|
259
|
+
this.inventoryService.getLocation(this.id).subscribe({
|
|
260
|
+
next: (res) => {
|
|
261
|
+
this.location = res.data;
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
onLocationSave(e) {
|
|
266
|
+
this.inventoryService.updateLocation(e.id, e).subscribe({
|
|
267
|
+
next: (res) => {
|
|
268
|
+
this.snackBarService.open('Success');
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
onLocationDetele(location) {
|
|
273
|
+
const options = {
|
|
274
|
+
title: '确定删除吗',
|
|
275
|
+
message: `这会删除仓库, 确定吗?`,
|
|
276
|
+
cancelText: 'Cancel',
|
|
277
|
+
confirmText: '确认',
|
|
278
|
+
};
|
|
279
|
+
this.dialogService.open(options);
|
|
280
|
+
this.dialogService.confirmed().subscribe({
|
|
281
|
+
next: (res) => {
|
|
282
|
+
if (res) {
|
|
283
|
+
this.inventoryService.deleteLocation(location.id).subscribe({
|
|
284
|
+
next: (res) => {
|
|
285
|
+
this.snackBarService.open('Delete successfully');
|
|
286
|
+
this.navigation.back();
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: InventoryLocationDetailComponent, isStandalone: true, selector: "rolatech-inventory-location-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InventoryLocationItemComponent, selector: "rolatech-inventory-location-item", inputs: ["location"], outputs: ["save", "delete"] }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
295
|
+
}
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationDetailComponent, decorators: [{
|
|
297
|
+
type: Component,
|
|
298
|
+
args: [{ selector: 'rolatech-inventory-location-detail', imports: [CommonModule, InventoryLocationItemComponent, ToolbarComponent], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"\u4ED3\u5E93\u8BE6\u60C5\" back> </rolatech-toolbar>\n@if (location) {\n <div class=\"px-3\">\n <rolatech-inventory-location-item\n [location]=\"location\"\n (save)=\"onLocationSave($event)\"\n (delete)=\"onLocationDetele($event)\"\n ></rolatech-inventory-location-item>\n </div>\n}\n" }]
|
|
299
|
+
}] });
|
|
300
|
+
|
|
301
|
+
var inventoryLocationDetail_component = /*#__PURE__*/Object.freeze({
|
|
302
|
+
__proto__: null,
|
|
303
|
+
InventoryLocationDetailComponent: InventoryLocationDetailComponent
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
class InventoryLocationAddComponent extends BaseComponent {
|
|
307
|
+
constructor() {
|
|
308
|
+
super(...arguments);
|
|
309
|
+
this.inventoryService = inject(InventoryService);
|
|
310
|
+
this.location = {};
|
|
311
|
+
}
|
|
312
|
+
selectLocation() {
|
|
313
|
+
const dialogRef = this.dialog.open(InventoryLocationMapComponent, {
|
|
314
|
+
width: '90%',
|
|
315
|
+
data: {
|
|
316
|
+
title: '选择位置',
|
|
317
|
+
},
|
|
318
|
+
});
|
|
319
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
320
|
+
if (result) {
|
|
321
|
+
const address = result.address;
|
|
322
|
+
const { lat, lng } = result.location;
|
|
323
|
+
this.location.detail = address;
|
|
324
|
+
this.location.latitude = lat;
|
|
325
|
+
this.location.longitude = lng;
|
|
326
|
+
this.location.province = result.province;
|
|
327
|
+
this.location.city = result.city;
|
|
328
|
+
this.location.district = result.district;
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
add() {
|
|
333
|
+
const data = {
|
|
334
|
+
...this.location,
|
|
335
|
+
};
|
|
336
|
+
this.inventoryService.addLocation(data).subscribe({
|
|
337
|
+
next: (res) => {
|
|
338
|
+
this.snackBarService.open('Add successfully');
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationAddComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
343
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: InventoryLocationAddComponent, isStandalone: true, selector: "rolatech-inventory-location-add", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"Add location\" back> </rolatech-toolbar>\n<div class=\"px-3 h-full\">\n <div class=\"w-full\">\n <div class=\"w-2/3 flex flex-col\">\n <form #locationForm=\"ngForm\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput [(ngModel)]=\"location.name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Contact </mat-label>\n <input matInput [(ngModel)]=\"location.contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"location.phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <h2 i18n>Location</h2>\n <button mat-stroked-button (click)=\"selectLocation()\">Location select</button>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Province </mat-label>\n <input matInput [(ngModel)]=\"location.province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> City </mat-label>\n <input matInput [(ngModel)]=\"location.city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> County </mat-label>\n <input matInput [(ngModel)]=\"location.district\" name=\"county\" required disabled />\n </mat-form-field>\n <!-- <mat-form-field appearance=\"fill\">\n <mat-label i18n> Street </mat-label>\n <input\n matInput\n [(ngModel)]=\"location.town\"\n name=\"town\"\n required\n readonly\n />\n </mat-form-field> -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Address </mat-label>\n <input matInput [(ngModel)]=\"location.detail\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Detail </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location.detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </form>\n </div>\n <div class=\"py-3\">\n <button mat-flat-button (click)=\"add()\" i18n>Save</button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: TextFieldModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
344
|
+
}
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: InventoryLocationAddComponent, decorators: [{
|
|
346
|
+
type: Component,
|
|
347
|
+
args: [{ selector: 'rolatech-inventory-location-add', imports: [ToolbarComponent, FormsModule, MatFormFieldModule, MatInputModule, MatButtonModule, TextFieldModule], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"Add location\" back> </rolatech-toolbar>\n<div class=\"px-3 h-full\">\n <div class=\"w-full\">\n <div class=\"w-2/3 flex flex-col\">\n <form #locationForm=\"ngForm\">\n <div class=\"flex flex-col\">\n <!-- base -->\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput [(ngModel)]=\"location.name\" name=\"name\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Contact </mat-label>\n <input matInput [(ngModel)]=\"location.contact\" name=\"contact\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"location.phone\" name=\"phone\" required />\n </mat-form-field>\n </div>\n <!-- location -->\n <div class=\"flex flex-col\">\n <div class=\"py-3 flex justify-between\">\n <h2 i18n>Location</h2>\n <button mat-stroked-button (click)=\"selectLocation()\">Location select</button>\n </div>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Province </mat-label>\n <input matInput [(ngModel)]=\"location.province\" name=\"province\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> City </mat-label>\n <input matInput [(ngModel)]=\"location.city\" name=\"city\" required disabled />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> County </mat-label>\n <input matInput [(ngModel)]=\"location.district\" name=\"county\" required disabled />\n </mat-form-field>\n <!-- <mat-form-field appearance=\"fill\">\n <mat-label i18n> Street </mat-label>\n <input\n matInput\n [(ngModel)]=\"location.town\"\n name=\"town\"\n required\n readonly\n />\n </mat-form-field> -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Address </mat-label>\n <input matInput [(ngModel)]=\"location.detail\" name=\"address\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Detail </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"location.detail\"\n name=\"detail\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </form>\n </div>\n <div class=\"py-3\">\n <button mat-flat-button (click)=\"add()\" i18n>Save</button>\n </div>\n </div>\n</div>\n" }]
|
|
348
|
+
}] });
|
|
349
|
+
|
|
350
|
+
var inventoryLocationAdd_component = /*#__PURE__*/Object.freeze({
|
|
351
|
+
__proto__: null,
|
|
352
|
+
InventoryLocationAddComponent: InventoryLocationAddComponent
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Generated bundle index. Do not edit.
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
export { InventoryContentComponent as I, InventoryLocationComponent as a, InventoryLocationDetailComponent as b, InventoryLocationAddComponent as c, inventoryRoutes as i };
|
|
360
|
+
//# sourceMappingURL=rolatech-angular-inventory-rolatech-angular-inventory-BS0EXGoZ.mjs.map
|