Compare commits
3 Commits
e1f1093d84
...
63b1926056
| Author | SHA1 | Date | |
|---|---|---|---|
|
63b1926056
|
|||
|
25dc50e05c
|
|||
|
a403832735
|
@@ -169,20 +169,22 @@ export default function () {
|
||||
Decisions:
|
||||
<br />
|
||||
Approved:
|
||||
{Object.keys(currentInactivity.decisions ?? {}).filter(
|
||||
(d) => currentInactivity.decisions[d],
|
||||
)}
|
||||
{Object.keys(currentInactivity.decisions ?? {})
|
||||
.filter((d) => currentInactivity.decisions[d])
|
||||
.join(", ")}
|
||||
<br />
|
||||
Denied:
|
||||
{Object.keys(currentInactivity.decisions ?? {}).filter(
|
||||
(d) => !currentInactivity.decisions[d],
|
||||
)}
|
||||
{Object.keys(currentInactivity.decisions ?? {})
|
||||
.filter((d) => !currentInactivity.decisions[d])
|
||||
.join(", ")}
|
||||
<br />
|
||||
Pending:
|
||||
{currentInactivity.departments?.filter(
|
||||
{currentInactivity.departments
|
||||
?.filter(
|
||||
(d: "DM" | "ET" | "FM" | "WM") =>
|
||||
typeof currentInactivity.decisions[d] === "undefined",
|
||||
)}
|
||||
)
|
||||
.join(", ")}
|
||||
</ListItem>
|
||||
</UnorderedList>
|
||||
</ModalBody>
|
||||
|
||||
@@ -91,8 +91,10 @@ export async function onRequestPost(context: RequestContext) {
|
||||
requestedNotice.decisions,
|
||||
);
|
||||
|
||||
for (const department of userAdminDepartments)
|
||||
for (const department of userAdminDepartments) {
|
||||
if (!JSON.parse(requestedNotice.departments).includes(department)) continue;
|
||||
decisions[department] = accepted;
|
||||
}
|
||||
|
||||
const applicableDepartments = JSON.parse(requestedNotice.departments).length;
|
||||
|
||||
|
||||
@@ -183,9 +183,10 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
const uploadUrlResults = await Promise.allSettled(uploadUrlPromises);
|
||||
|
||||
const reportId = `${Date.now()}${context.request.headers.get(
|
||||
"cf-ray",
|
||||
)}${crypto.randomUUID().replaceAll("-", "")}`;
|
||||
const reportId = `${Date.now()}${context.request.headers
|
||||
.get("cf-ray")
|
||||
?.split("-")
|
||||
?.at(0)}${crypto.randomUUID().replaceAll("-", "")}`;
|
||||
|
||||
const { current_user: currentUser } = context.data;
|
||||
if (filesToProcess.length)
|
||||
|
||||
Reference in New Issue
Block a user