repair: shift schema
This commit is contained in:
@@ -64,7 +64,7 @@ const getScheduleByIdDb = async (id) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const insertScheduleDb = async (store) => {
|
const insertScheduleDb = async (store) => {
|
||||||
const nextDays = Number(store.next_day ?? 0);
|
const nextDays = Number(store.next_day ?? 0); // default 0 kalau tidak diisi
|
||||||
const insertedRecords = [];
|
const insertedRecords = [];
|
||||||
|
|
||||||
for (let i = 0; i <= nextDays; i++) {
|
for (let i = 0; i <= nextDays; i++) {
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ const updateShiftSchema = Joi.object({
|
|||||||
.messages({
|
.messages({
|
||||||
"string.pattern.base": "end_time harus dalam format HH:mm atau HH:mm:ss",
|
"string.pattern.base": "end_time harus dalam format HH:mm atau HH:mm:ss",
|
||||||
}),
|
}),
|
||||||
is_active: Joi.boolean().optional()
|
|
||||||
}).min(1);
|
}).min(1);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Reference in New Issue
Block a user