@iankibetsh/shframework 2.0.1 → 2.0.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 +9 -3
- package/dist/library.mjs +9 -3
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -4007,6 +4007,9 @@ var script$d = {
|
|
|
4007
4007
|
url: {
|
|
4008
4008
|
type: String,
|
|
4009
4009
|
required: true
|
|
4010
|
+
},
|
|
4011
|
+
disableSuccessMessage: {
|
|
4012
|
+
type: Boolean
|
|
4010
4013
|
}
|
|
4011
4014
|
},
|
|
4012
4015
|
emits: ['actionSuccessful','actionFailed','success'],
|
|
@@ -4023,7 +4026,9 @@ const actionSuccessful = (res)=>{
|
|
|
4023
4026
|
console.log(res.data,props.successMessage);
|
|
4024
4027
|
emit('actionSuccessful',res);
|
|
4025
4028
|
emit('success',res);
|
|
4026
|
-
|
|
4029
|
+
if(!props.disableSuccessMessage) {
|
|
4030
|
+
shRepo.showToast(res.data.message ?? props.successMessage);
|
|
4031
|
+
}
|
|
4027
4032
|
};
|
|
4028
4033
|
|
|
4029
4034
|
const actionFailed = reason =>{
|
|
@@ -6038,7 +6043,7 @@ vue.ref([]);
|
|
|
6038
6043
|
let reload = vue.ref(0);
|
|
6039
6044
|
|
|
6040
6045
|
function departmentAdded (response) {
|
|
6041
|
-
shRepo.showToast('Department
|
|
6046
|
+
shRepo.showToast('Department saved');
|
|
6042
6047
|
reload.value += 1;
|
|
6043
6048
|
}
|
|
6044
6049
|
|
|
@@ -6066,6 +6071,7 @@ return (_ctx, _cache) => {
|
|
|
6066
6071
|
vue.createTextVNode(" ADD DEPARTMENT")
|
|
6067
6072
|
], 512 /* NEED_PATCH */),
|
|
6068
6073
|
vue.createVNode(script$c, {
|
|
6074
|
+
reload: vue.unref(reload),
|
|
6069
6075
|
headers: ['id','name','description', 'created_at'],
|
|
6070
6076
|
"end-point": "sh-departments/list",
|
|
6071
6077
|
actions: {
|
|
@@ -6083,7 +6089,7 @@ return (_ctx, _cache) => {
|
|
|
6083
6089
|
}
|
|
6084
6090
|
]
|
|
6085
6091
|
}
|
|
6086
|
-
}, null, 8 /* PROPS */, ["actions"]),
|
|
6092
|
+
}, null, 8 /* PROPS */, ["reload", "actions"]),
|
|
6087
6093
|
vue.createVNode(script$j, {
|
|
6088
6094
|
"modal-id": "sh_department_modal",
|
|
6089
6095
|
"modal-title": "Department Form"
|
package/dist/library.mjs
CHANGED
|
@@ -3995,6 +3995,9 @@ var script$d = {
|
|
|
3995
3995
|
url: {
|
|
3996
3996
|
type: String,
|
|
3997
3997
|
required: true
|
|
3998
|
+
},
|
|
3999
|
+
disableSuccessMessage: {
|
|
4000
|
+
type: Boolean
|
|
3998
4001
|
}
|
|
3999
4002
|
},
|
|
4000
4003
|
emits: ['actionSuccessful','actionFailed','success'],
|
|
@@ -4011,7 +4014,9 @@ const actionSuccessful = (res)=>{
|
|
|
4011
4014
|
console.log(res.data,props.successMessage);
|
|
4012
4015
|
emit('actionSuccessful',res);
|
|
4013
4016
|
emit('success',res);
|
|
4014
|
-
|
|
4017
|
+
if(!props.disableSuccessMessage) {
|
|
4018
|
+
shRepo.showToast(res.data.message ?? props.successMessage);
|
|
4019
|
+
}
|
|
4015
4020
|
};
|
|
4016
4021
|
|
|
4017
4022
|
const actionFailed = reason =>{
|
|
@@ -6026,7 +6031,7 @@ ref([]);
|
|
|
6026
6031
|
let reload = ref(0);
|
|
6027
6032
|
|
|
6028
6033
|
function departmentAdded (response) {
|
|
6029
|
-
shRepo.showToast('Department
|
|
6034
|
+
shRepo.showToast('Department saved');
|
|
6030
6035
|
reload.value += 1;
|
|
6031
6036
|
}
|
|
6032
6037
|
|
|
@@ -6054,6 +6059,7 @@ return (_ctx, _cache) => {
|
|
|
6054
6059
|
createTextVNode(" ADD DEPARTMENT")
|
|
6055
6060
|
], 512 /* NEED_PATCH */),
|
|
6056
6061
|
createVNode(script$c, {
|
|
6062
|
+
reload: unref(reload),
|
|
6057
6063
|
headers: ['id','name','description', 'created_at'],
|
|
6058
6064
|
"end-point": "sh-departments/list",
|
|
6059
6065
|
actions: {
|
|
@@ -6071,7 +6077,7 @@ return (_ctx, _cache) => {
|
|
|
6071
6077
|
}
|
|
6072
6078
|
]
|
|
6073
6079
|
}
|
|
6074
|
-
}, null, 8 /* PROPS */, ["actions"]),
|
|
6080
|
+
}, null, 8 /* PROPS */, ["reload", "actions"]),
|
|
6075
6081
|
createVNode(script$j, {
|
|
6076
6082
|
"modal-id": "sh_department_modal",
|
|
6077
6083
|
"modal-title": "Department Form"
|