apple ID setup cmd, backend API tweaks
This commit is contained in:
@ -11,7 +11,10 @@ if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
||||
|
||||
Usage:
|
||||
node apple.mjs [--kid] [--iss] [--private_key] [--sub] [--expires_in] [--exp]
|
||||
|
||||
|
||||
node setupAppleId.mjs --kid YOUR_KEY_ID --iss YOUR_TEAM_ID --private_key "$(cat key.p8)" --sub YOUR_CLIENT_ID --expires_in 15778800
|
||||
|
||||
|
||||
Options:
|
||||
--help Print this help message
|
||||
--kid, --key_id The key id of the private key
|
||||
|
@ -593,13 +593,10 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
|
||||
// Check if dayOfMonth is null and match by day of week using the enum (Assigments every week)
|
||||
// This includes availabilities from previous assignments but not with preference
|
||||
{
|
||||
dayOfMonth: null,
|
||||
dayOfMonth: null, // includes monthly and weekly repeats
|
||||
dayofweek: dayOfWeekEnum,
|
||||
// ToDo: and weekOfMonth
|
||||
//startTime: { gte: currentMonthStart },
|
||||
},
|
||||
{
|
||||
repeatWeekly: true,
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -620,7 +617,6 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
|
||||
dayOfMonth: null,
|
||||
dayofweek: dayOfWeekEnum,
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -741,6 +737,11 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
|
||||
return avail.dayOfMonth != null && avail.startTime >= currentMonthStart; // && avail.startTime <= currentMonthEnd;
|
||||
});
|
||||
|
||||
//if pub has availabilities for the current day
|
||||
pub.hasAvailabilityForCurrentDay = pub.availabilities?.some(avail => {
|
||||
return avail.startTime >= filterDate && avail.startTime <= filterDateEnd;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
if (filterDate && useDateFilter) {
|
||||
|
Reference in New Issue
Block a user