@colijnit/configurator 262.1.7 → 262.1.8
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.
|
Binary file
|
|
@@ -833,6 +833,12 @@ class ConfiguratorConnectorService {
|
|
|
833
833
|
get shouldShowLoader() {
|
|
834
834
|
return this._shouldShowLoader;
|
|
835
835
|
}
|
|
836
|
+
set instanceId(instanceId) {
|
|
837
|
+
this._instanceId = instanceId;
|
|
838
|
+
}
|
|
839
|
+
get instanceId() {
|
|
840
|
+
return this._instanceId;
|
|
841
|
+
}
|
|
836
842
|
controllerInitialized = new BehaviorSubject(false);
|
|
837
843
|
standAloneInstance = new BehaviorSubject(false);
|
|
838
844
|
connectionReset = new Subject();
|
|
@@ -858,6 +864,7 @@ class ConfiguratorConnectorService {
|
|
|
858
864
|
_initialized = false;
|
|
859
865
|
_boFactory = new BusinessObjectFactory();
|
|
860
866
|
_configuratorService;
|
|
867
|
+
_instanceId;
|
|
861
868
|
constructor(_appEventService, _settingsService, _loaderService, _utilitiesConnectorService) {
|
|
862
869
|
this._appEventService = _appEventService;
|
|
863
870
|
this._settingsService = _settingsService;
|
|
@@ -1187,8 +1194,10 @@ class ConfiguratorConnectorService {
|
|
|
1187
1194
|
console.error('error saving configurations');
|
|
1188
1195
|
}
|
|
1189
1196
|
}
|
|
1190
|
-
async storePreset(
|
|
1191
|
-
|
|
1197
|
+
async storePreset(showLoader = true) {
|
|
1198
|
+
if (this.instanceId) {
|
|
1199
|
+
return this._configuratorService.storePreset(this.instanceId, showLoader);
|
|
1200
|
+
}
|
|
1192
1201
|
}
|
|
1193
1202
|
async initForPreset(presetId, goodId, showLoader = true) {
|
|
1194
1203
|
return this._configuratorService.initForPreset(presetId, goodId, showLoader);
|
|
@@ -1364,6 +1373,7 @@ class ConfiguratorConnectorService {
|
|
|
1364
1373
|
_handleInstanceResponse(response) {
|
|
1365
1374
|
if (response && response.validationResult && response.validationResult.success) {
|
|
1366
1375
|
this._appEventService.instanceSet.next(response.resultObject);
|
|
1376
|
+
this.instanceId = response.resultObject;
|
|
1367
1377
|
}
|
|
1368
1378
|
return response;
|
|
1369
1379
|
}
|
|
@@ -9631,7 +9641,7 @@ class ConfigurationPresetDialogComponent {
|
|
|
9631
9641
|
handleOpenDialog(mode) {
|
|
9632
9642
|
if (mode === PresetDialogMode.SAVE) {
|
|
9633
9643
|
const instanceId = this._instanceId;
|
|
9634
|
-
this._configuratorConnectorService.storePreset(
|
|
9644
|
+
this._configuratorConnectorService.storePreset().then((response) => {
|
|
9635
9645
|
if (response && response.validationResult && response.validationResult.success) {
|
|
9636
9646
|
this.instanceIdInput = response.resultObject;
|
|
9637
9647
|
this.dialogMode = mode;
|