This commit is contained in:
@@ -27,5 +27,30 @@ export default {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
After(startDate, endDate) {
|
||||
if (startDate === undefined || startDate === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (endDate === undefined || endDate === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
startDate = dayjs(startDate);
|
||||
endDate = dayjs(endDate);
|
||||
|
||||
// if either is not valid.
|
||||
if (!startDate || !endDate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (startDate.isAfter(endDate)) {
|
||||
// "ErrorStartDateAfterEndDate": "Start date must be earlier than stop / end date",
|
||||
var err = locale.get("ErrorStartDateAfterEndDate");
|
||||
return err;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ function addNavItem(title, icon, route) {
|
||||
// on change of authentication status
|
||||
export default function initialize() {
|
||||
if (store.state.authenticated) {
|
||||
//GET ALL DEFAULT LOCALIZED TEXT FOR SHELL
|
||||
//Fetch the core localized text keys that will always be required by user
|
||||
locale
|
||||
.fetch(locale.coreKeys)
|
||||
.then(function() {
|
||||
|
||||
@@ -65,7 +65,8 @@ export default {
|
||||
"WikiPage",
|
||||
"Duplicate",
|
||||
"RecordHistory",
|
||||
"ErrorFieldLengthExceeded"
|
||||
"ErrorFieldLengthExceeded",
|
||||
"ErrorStartDateAfterEndDate"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.formats.decimalSeparator] };
|
||||
|
||||
Reference in New Issue
Block a user