tin-spa 2.13.2 → 2.13.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/esm2020/lib/components/table/detailsDialog.component.mjs +16 -3
- package/esm2020/lib/components/table-internal/detailsDialog-internal.component.mjs +15 -2
- package/esm2020/lib/components/table-lite/detailsDialog-lite.component.mjs +15 -2
- package/fesm2015/tin-spa.mjs +43 -4
- package/fesm2015/tin-spa.mjs.map +1 -1
- package/fesm2020/tin-spa.mjs +43 -4
- package/fesm2020/tin-spa.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/tin-spa.mjs
CHANGED
|
@@ -5318,7 +5318,20 @@ class DetailsDialogLite {
|
|
|
5318
5318
|
button.onSuccess(apiResponse.data, this.details);
|
|
5319
5319
|
}
|
|
5320
5320
|
if (button.keepOpen) {
|
|
5321
|
-
|
|
5321
|
+
if (button.name === 'create' && apiResponse.data) {
|
|
5322
|
+
this.details = apiResponse.data;
|
|
5323
|
+
if (this.detailsConfig.heroField && apiResponse.data[this.detailsConfig.heroField]) {
|
|
5324
|
+
this.detailsConfig.heroValue = apiResponse.data[this.detailsConfig.heroField];
|
|
5325
|
+
this.formConfig.heroField = this.detailsConfig.heroField;
|
|
5326
|
+
this.formConfig.heroValue = this.detailsConfig.heroValue;
|
|
5327
|
+
}
|
|
5328
|
+
this.formConfig.mode = 'edit';
|
|
5329
|
+
this.setTitleAction();
|
|
5330
|
+
this.isLoadComplete = true;
|
|
5331
|
+
}
|
|
5332
|
+
else {
|
|
5333
|
+
this.refreshData();
|
|
5334
|
+
}
|
|
5322
5335
|
}
|
|
5323
5336
|
else {
|
|
5324
5337
|
this.dialogRef.close({ message: 'success', data: { ...apiResponse, data: button.name == 'create' ? apiResponse.data : this.details } });
|
|
@@ -6895,7 +6908,20 @@ class DetailsDialogInternal {
|
|
|
6895
6908
|
button.onSuccess(apiResponse.data, this.details);
|
|
6896
6909
|
}
|
|
6897
6910
|
if (button.keepOpen) {
|
|
6898
|
-
|
|
6911
|
+
if (button.name === 'create' && apiResponse.data) {
|
|
6912
|
+
this.details = apiResponse.data;
|
|
6913
|
+
if (this.detailsConfig.heroField && apiResponse.data[this.detailsConfig.heroField]) {
|
|
6914
|
+
this.detailsConfig.heroValue = apiResponse.data[this.detailsConfig.heroField];
|
|
6915
|
+
this.formConfig.heroField = this.detailsConfig.heroField;
|
|
6916
|
+
this.formConfig.heroValue = this.detailsConfig.heroValue;
|
|
6917
|
+
}
|
|
6918
|
+
this.formConfig.mode = 'edit';
|
|
6919
|
+
this.setTitleAction();
|
|
6920
|
+
this.isLoadComplete = true;
|
|
6921
|
+
}
|
|
6922
|
+
else {
|
|
6923
|
+
this.refreshData();
|
|
6924
|
+
}
|
|
6899
6925
|
}
|
|
6900
6926
|
else {
|
|
6901
6927
|
this.dialogRef.close({ message: 'success', data: { ...apiResponse, data: button.name == 'create' ? apiResponse.data : this.details } });
|
|
@@ -7951,10 +7977,23 @@ class DetailsDialog {
|
|
|
7951
7977
|
this.messageService.toast("Updated");
|
|
7952
7978
|
}
|
|
7953
7979
|
if (button.onSuccess) {
|
|
7954
|
-
button.onSuccess(apiResponse, this.details);
|
|
7980
|
+
button.onSuccess(apiResponse.data, this.details);
|
|
7955
7981
|
}
|
|
7956
7982
|
if (button.keepOpen) {
|
|
7957
|
-
|
|
7983
|
+
if (button.name === 'create' && apiResponse.data) {
|
|
7984
|
+
this.details = apiResponse.data;
|
|
7985
|
+
if (this.detailsConfig.heroField && apiResponse.data[this.detailsConfig.heroField]) {
|
|
7986
|
+
this.detailsConfig.heroValue = apiResponse.data[this.detailsConfig.heroField];
|
|
7987
|
+
this.formConfig.heroField = this.detailsConfig.heroField;
|
|
7988
|
+
this.formConfig.heroValue = this.detailsConfig.heroValue;
|
|
7989
|
+
}
|
|
7990
|
+
this.formConfig.mode = 'edit';
|
|
7991
|
+
this.setTitleAction();
|
|
7992
|
+
this.isLoadComplete = true;
|
|
7993
|
+
}
|
|
7994
|
+
else {
|
|
7995
|
+
this.refreshData();
|
|
7996
|
+
}
|
|
7958
7997
|
}
|
|
7959
7998
|
else {
|
|
7960
7999
|
this.dialogRef.close({ message: 'success', data: { ...apiResponse, data: button.name == 'create' ? apiResponse.data : this.details } });
|