Server Responses
Simcify has a function that handles server responses. The function can still be called even if the response is not from the server as long as the correct JSON format is passed.
below are the expected response from server for this function;
Usage
Here is sample usage;
Response Explanation
item
Required
Type
Description
status
Yes
string
warning | success | info | error (info is default).
title
Yes|No
string
Response title. (required if notify is true and notifyType is toastr).
message
Yes|No
string
Response message. (required if notify is true and notifyType is toastr).
notify
No
boolean
whether to notify user on complete, default is true.
notifyType
No
string
use "swal" or "toastr", default is "swal".
callback
No
string
callback function.
callbackTime
No
string
"instant" or "onconfirm", if notifyType is toastr, callbackTime must be instant.
showCancelButton
No
boolean
only added when notifyType is swal.
buttonText
No
string
label of confirm button, only added when notifyType is swal.
Last updated