@iankibetsh/shframework 0.5.6 → 0.5.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.
- package/dist/library.js +5 -8
- package/dist/library.mjs +5 -8
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2153,8 +2153,7 @@ var script$6 = {
|
|
|
2153
2153
|
this.form_status = 3;
|
|
2154
2154
|
if (typeof reason !== 'undefined') {
|
|
2155
2155
|
if (typeof reason.response !== 'undefined') {
|
|
2156
|
-
this.
|
|
2157
|
-
this.setErrors(reason.response);
|
|
2156
|
+
this.setErrors(reason.response, reason.message);
|
|
2158
2157
|
} else {
|
|
2159
2158
|
console.log('catch error');
|
|
2160
2159
|
console.log(reason);
|
|
@@ -2162,10 +2161,6 @@ var script$6 = {
|
|
|
2162
2161
|
} else {
|
|
2163
2162
|
console.log(reason);
|
|
2164
2163
|
}
|
|
2165
|
-
const self = this;
|
|
2166
|
-
setTimeout(() => {
|
|
2167
|
-
self.hideError();
|
|
2168
|
-
}, 4000);
|
|
2169
2164
|
});
|
|
2170
2165
|
return false
|
|
2171
2166
|
},
|
|
@@ -2173,10 +2168,12 @@ var script$6 = {
|
|
|
2173
2168
|
this.form_errors[field] = null;
|
|
2174
2169
|
this.form_status = 0;
|
|
2175
2170
|
},
|
|
2176
|
-
setErrors: function (reason) {
|
|
2177
|
-
console.log(reason);
|
|
2171
|
+
setErrors: function (reason, message) {
|
|
2172
|
+
console.log(reason,message);
|
|
2178
2173
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2179
2174
|
this.form_errors = reason.data.errors;
|
|
2175
|
+
} else {
|
|
2176
|
+
this.errorText = message;
|
|
2180
2177
|
}
|
|
2181
2178
|
},
|
|
2182
2179
|
handleFileUpload: function (key) {
|
package/dist/library.mjs
CHANGED
|
@@ -2141,8 +2141,7 @@ var script$6 = {
|
|
|
2141
2141
|
this.form_status = 3;
|
|
2142
2142
|
if (typeof reason !== 'undefined') {
|
|
2143
2143
|
if (typeof reason.response !== 'undefined') {
|
|
2144
|
-
this.
|
|
2145
|
-
this.setErrors(reason.response);
|
|
2144
|
+
this.setErrors(reason.response, reason.message);
|
|
2146
2145
|
} else {
|
|
2147
2146
|
console.log('catch error');
|
|
2148
2147
|
console.log(reason);
|
|
@@ -2150,10 +2149,6 @@ var script$6 = {
|
|
|
2150
2149
|
} else {
|
|
2151
2150
|
console.log(reason);
|
|
2152
2151
|
}
|
|
2153
|
-
const self = this;
|
|
2154
|
-
setTimeout(() => {
|
|
2155
|
-
self.hideError();
|
|
2156
|
-
}, 4000);
|
|
2157
2152
|
});
|
|
2158
2153
|
return false
|
|
2159
2154
|
},
|
|
@@ -2161,10 +2156,12 @@ var script$6 = {
|
|
|
2161
2156
|
this.form_errors[field] = null;
|
|
2162
2157
|
this.form_status = 0;
|
|
2163
2158
|
},
|
|
2164
|
-
setErrors: function (reason) {
|
|
2165
|
-
console.log(reason);
|
|
2159
|
+
setErrors: function (reason, message) {
|
|
2160
|
+
console.log(reason,message);
|
|
2166
2161
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2167
2162
|
this.form_errors = reason.data.errors;
|
|
2163
|
+
} else {
|
|
2164
|
+
this.errorText = message;
|
|
2168
2165
|
}
|
|
2169
2166
|
},
|
|
2170
2167
|
handleFileUpload: function (key) {
|