@iankibetsh/shframework 5.1.2 → 5.1.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/dist/library.js +6 -3
- package/dist/library.mjs +6 -3
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -4259,16 +4259,19 @@ const actionSuccessful = (res)=>{
|
|
|
4259
4259
|
res.actionType = 'silentAction';
|
|
4260
4260
|
emit('actionSuccessful',res);
|
|
4261
4261
|
emit('success',res);
|
|
4262
|
-
|
|
4262
|
+
if(props.successMessage || res.message){
|
|
4263
|
+
shRepo.showToast(res.message ?? props.successMessage);
|
|
4264
|
+
}
|
|
4263
4265
|
};
|
|
4264
4266
|
|
|
4265
4267
|
const actionFailed = reason =>{
|
|
4266
|
-
console.log(reason);
|
|
4267
4268
|
processing.value = false;
|
|
4268
4269
|
reason.actionType = 'silentAction';
|
|
4269
4270
|
emit('actionFailed', reason);
|
|
4270
4271
|
emit('failed', reason);
|
|
4271
|
-
|
|
4272
|
+
if (props.failMessage || reason.value?.message) {
|
|
4273
|
+
shRepo.showToast(reason.value.message ?? props.failMessage,'error');
|
|
4274
|
+
}
|
|
4272
4275
|
};
|
|
4273
4276
|
function runAction () {
|
|
4274
4277
|
processing.value = true;
|
package/dist/library.mjs
CHANGED
|
@@ -4247,16 +4247,19 @@ const actionSuccessful = (res)=>{
|
|
|
4247
4247
|
res.actionType = 'silentAction';
|
|
4248
4248
|
emit('actionSuccessful',res);
|
|
4249
4249
|
emit('success',res);
|
|
4250
|
-
|
|
4250
|
+
if(props.successMessage || res.message){
|
|
4251
|
+
shRepo.showToast(res.message ?? props.successMessage);
|
|
4252
|
+
}
|
|
4251
4253
|
};
|
|
4252
4254
|
|
|
4253
4255
|
const actionFailed = reason =>{
|
|
4254
|
-
console.log(reason);
|
|
4255
4256
|
processing.value = false;
|
|
4256
4257
|
reason.actionType = 'silentAction';
|
|
4257
4258
|
emit('actionFailed', reason);
|
|
4258
4259
|
emit('failed', reason);
|
|
4259
|
-
|
|
4260
|
+
if (props.failMessage || reason.value?.message) {
|
|
4261
|
+
shRepo.showToast(reason.value.message ?? props.failMessage,'error');
|
|
4262
|
+
}
|
|
4260
4263
|
};
|
|
4261
4264
|
function runAction () {
|
|
4262
4265
|
processing.value = true;
|