renames
This commit is contained in:
@ -147,7 +147,7 @@ async function getAvailabilities(userId) {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
isactive: true,
|
||||
isActive: true,
|
||||
isFromPreviousAssignment: true,
|
||||
dayofweek: true,
|
||||
dayOfMonth: true,
|
||||
@ -182,7 +182,7 @@ async function getAvailabilities(userId) {
|
||||
shiftId Int
|
||||
publisher Publisher @relation(fields: [publisherId], references: [id], onDelete: Cascade)
|
||||
publisherId String
|
||||
isactive Boolean @default(true)
|
||||
isActive Boolean @default(true)
|
||||
isConfirmed Boolean @default(false)
|
||||
isWithTransport Boolean @default(false)
|
||||
Report Report[]
|
||||
@ -194,7 +194,7 @@ async function getAvailabilities(userId) {
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
isTentative: true,
|
||||
isBySystem: true,
|
||||
isConfirmed: true,
|
||||
isWithTransport: true,
|
||||
shift: {
|
||||
|
@ -323,21 +323,21 @@ exports.processEvents = async function (events, year, monthNumber, progressCallb
|
||||
}
|
||||
var shifts = await prisma.shift.findMany({
|
||||
where: {
|
||||
isactive: true,
|
||||
isActive: true,
|
||||
startTime: {
|
||||
gte: monthDatesInfo.firstMonday,
|
||||
lt: monthDatesInfo.lastSunday,
|
||||
},
|
||||
}
|
||||
});
|
||||
var locations = await prisma.location.findMany({ where: { isactive: true, } });
|
||||
var locations = await prisma.location.findMany({ where: { isActive: true, } });
|
||||
|
||||
var cartEvents = await prisma.cartEvent.findMany({ where: { isactive: true, } });
|
||||
var cartEvents = await prisma.cartEvent.findMany({ where: { isActive: true, } });
|
||||
|
||||
var publishers = await prisma.publisher.findMany({
|
||||
where: { isactive: true, },
|
||||
where: { isActive: true, },
|
||||
include: {
|
||||
availabilities: { where: { isactive: true, }, },
|
||||
availabilities: { where: { isActive: true, }, },
|
||||
assignments: { include: { shift: true, }, },
|
||||
},
|
||||
});
|
||||
@ -472,7 +472,7 @@ exports.processEvents = async function (events, year, monthNumber, progressCallb
|
||||
email: name.toLowerCase().replace(/ /g, "."), // + "@gmail.com"
|
||||
firstName: firstname,
|
||||
lastName: lastname,
|
||||
isactive: true,
|
||||
isActive: true,
|
||||
isImported: true,
|
||||
// role: "EXTERNAL",
|
||||
};
|
||||
@ -492,7 +492,7 @@ exports.processEvents = async function (events, year, monthNumber, progressCallb
|
||||
// endTime: endTime,
|
||||
// name: `от предишен график, ${publisher.firstName} ${publisher.lastName}`,
|
||||
// isFromPreviousAssignment: true,
|
||||
// isactive: true,
|
||||
// isActive: true,
|
||||
// },
|
||||
// });
|
||||
// console.log(`Created WEEKLY availability with ID ${availability.id} for date '${date.toDateString()}' and publisher '${publisher.firstName} ${publisher.lastName}'`);
|
||||
|
@ -11,7 +11,7 @@ SELECT DISTINCT Publisher.*
|
||||
FROM Publisher
|
||||
INNER JOIN Availability ON Availability.publisherId = Publisher.id
|
||||
WHERE
|
||||
Availability.isactive = true
|
||||
Availability.isActive = true
|
||||
AND ( (
|
||||
Availability.dayOfMonth IS NOT NULL
|
||||
AND Availability.startTime <= '2023-03-30 13:00:00'
|
||||
@ -30,7 +30,7 @@ SELECT DISTINCT Publisher.*
|
||||
FROM Publisher
|
||||
INNER JOIN Availability ON Availability.publisherId = Publisher.id
|
||||
WHERE
|
||||
Availability.isactive = true
|
||||
Availability.isActive = true
|
||||
AND (Availability.dayOfMonth = 5) clfuyo33e005aknvchf1wm3bu All publishers: 121;
|
||||
|
||||
(118) unique,
|
||||
|
Reference in New Issue
Block a user