gunsmith-common 2.2.8 → 2.2.9
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/esm2020/shared/controls/package-selector/package-selector.component.mjs +11 -5
- package/fesm2015/gunsmith-common.mjs +9 -4
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +9 -3
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.2.9.tgz +0 -0
- package/package.json +1 -1
- package/shared/controls/package-selector/package-selector.component.d.ts +4 -2
- package/gunsmith-common-2.2.8.tgz +0 -0
|
@@ -1976,8 +1976,7 @@ class PackageSelectorComponent {
|
|
|
1976
1976
|
this.createForm();
|
|
1977
1977
|
}
|
|
1978
1978
|
ngOnChanges(changes) {
|
|
1979
|
-
if ((changes
|
|
1980
|
-
(changes.projectType?.currentValue === ProjectType.Firearm && this.firearmId)) {
|
|
1979
|
+
if (this.canGetPackages(changes)) {
|
|
1981
1980
|
this.getPackages();
|
|
1982
1981
|
this.packageForm.reset();
|
|
1983
1982
|
}
|
|
@@ -1986,6 +1985,11 @@ class PackageSelectorComponent {
|
|
|
1986
1985
|
this.packageForm.reset();
|
|
1987
1986
|
}
|
|
1988
1987
|
}
|
|
1988
|
+
canGetPackages(changes) {
|
|
1989
|
+
return (changes.firearmId && changes.firearmId.currentValue && this.projectType === ProjectType.Firearm && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
|
|
1990
|
+
(changes.projectType && changes.projectType.currentValue === ProjectType.Firearm && this.firearmId && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
|
|
1991
|
+
(changes.workOrderType && (changes.workOrderType.currentValue === WorkOrderType.Standard || changes.workOrderType.currentValue === WorkOrderType.NewInBox) && this.firearmId && this.projectType === ProjectType.Firearm);
|
|
1992
|
+
}
|
|
1989
1993
|
ngAfterViewInit() {
|
|
1990
1994
|
const outerControl = this.inj.get(NgControl).control;
|
|
1991
1995
|
const prevMarkAsTouched = outerControl.markAsTouched;
|
|
@@ -2101,7 +2105,7 @@ class PackageSelectorComponent {
|
|
|
2101
2105
|
}
|
|
2102
2106
|
}
|
|
2103
2107
|
PackageSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, deps: [{ token: PackageService }, { token: i2.FormBuilder }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2104
|
-
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", gunsmithOnly: "gunsmithOnly" }, providers: [
|
|
2108
|
+
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", workOrderType: "workOrderType", gunsmithOnly: "gunsmithOnly" }, providers: [
|
|
2105
2109
|
{
|
|
2106
2110
|
provide: NG_VALUE_ACCESSOR,
|
|
2107
2111
|
multi: true,
|
|
@@ -2131,6 +2135,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2131
2135
|
type: Input
|
|
2132
2136
|
}], projectType: [{
|
|
2133
2137
|
type: Input
|
|
2138
|
+
}], workOrderType: [{
|
|
2139
|
+
type: Input
|
|
2134
2140
|
}], gunsmithOnly: [{
|
|
2135
2141
|
type: Input
|
|
2136
2142
|
}] } });
|