fix imports

This commit is contained in:
Dobromir Popov
2024-02-29 00:15:24 +02:00
parent 7dba304f25
commit 978ea7e231

View File

@ -146,7 +146,7 @@ export default function ImportPage() {
let isOld = false;
const row = rawData[i];
var email, phone, names, dateOfInput, oldAvDeleted = false, isTrained = false, desiredShiftsPerMonth = 4, isActive = false, publisherType = PublisherType.Publisher;
let email, phone, names, dateOfInput, oldAvDeleted = false, isTrained = false, desiredShiftsPerMonth = 4, isActive = false, publisherType = PublisherType.Publisher;
//const date = new Date(row[0]).toISOS{tring().slice(0, 10);
if (mode.mainMode == MODE_PUBLISHERS1) {
@ -180,6 +180,7 @@ export default function ImportPage() {
const day = new Date();
day.setDate(1); // Set to the first day of the month to avoid overflow
dateOfInput = new Date(dateOfInput);
// Calculate the total month difference by considering the year difference
let totalMonthDifference = (day.getFullYear() - dateOfInput.getFullYear()) * 12 + (day.getMonth() - dateOfInput.getMonth());
// If the total month difference is 2 or more, set isOld to true