Skip to content

Commit 12f4252

Browse files
authored
Merge pull request #660 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 20e382d + 3f77e3b commit 12f4252

File tree

7 files changed

+67
-1
lines changed

7 files changed

+67
-1
lines changed

src/components/CippComponents/CippAddUserDrawer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Button, Box } from "@mui/material";
33
import { useForm, useWatch, useFormState } from "react-hook-form";
44
import { PersonAdd } from "@mui/icons-material";
55
import { CippOffCanvas } from "./CippOffCanvas";
6-
import { CippFormUserSelector } from "./CippFormUserSelector";
76
import { CippApiResults } from "./CippApiResults";
87
import { useSettings } from "../../hooks/use-settings";
98
import { ApiPostCall } from "../../api/ApiCall";

src/components/CippComponents/CippAddVacationModeDrawer.jsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const CippAddVacationModeDrawer = ({
2828
PolicyId: null,
2929
startDate: null,
3030
endDate: null,
31+
reference: null,
32+
postExecution: [],
3133
excludeLocationAuditAlerts: false,
3234
},
3335
});
@@ -85,6 +87,8 @@ export const CippAddVacationModeDrawer = ({
8587
PolicyId: null,
8688
startDate: null,
8789
endDate: null,
90+
reference: null,
91+
postExecution: [],
8892
excludeLocationAuditAlerts: false,
8993
});
9094
}
@@ -105,6 +109,8 @@ export const CippAddVacationModeDrawer = ({
105109
StartDate: formData.startDate,
106110
EndDate: formData.endDate,
107111
vacation: true,
112+
reference: formData.reference || null,
113+
postExecution: formData.postExecution || [],
108114
excludeLocationAuditAlerts: formData.excludeLocationAuditAlerts || false,
109115
};
110116

@@ -124,6 +130,8 @@ export const CippAddVacationModeDrawer = ({
124130
PolicyId: null,
125131
startDate: null,
126132
endDate: null,
133+
reference: null,
134+
postExecution: [],
127135
});
128136
};
129137

@@ -295,6 +303,33 @@ export const CippAddVacationModeDrawer = ({
295303
}}
296304
/>
297305
</Grid>
306+
307+
{/* Post Execution Actions */}
308+
<Grid size={{ md: 12, xs: 12 }}>
309+
<CippFormComponent
310+
type="autoComplete"
311+
name="postExecution"
312+
label="Post Execution Actions"
313+
formControl={formControl}
314+
multiple
315+
creatable={false}
316+
options={[
317+
{ label: "Webhook", value: "Webhook" },
318+
{ label: "Email", value: "Email" },
319+
{ label: "PSA", value: "PSA" },
320+
]}
321+
/>
322+
</Grid>
323+
324+
<Grid size={{ xs: 12 }}>
325+
<CippFormComponent
326+
type="textField"
327+
label="Reference"
328+
name="reference"
329+
formControl={formControl}
330+
placeholder="Optional note to help identify this vacation schedule, this is also added to notification titles."
331+
/>
332+
</Grid>
298333
{policyHasLocationTarget && (
299334
<Grid size={{ xs: 12 }}>
300335
<CippFormComponent

src/components/CippFormPages/CippAddEditUser.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,14 @@ const CippAddEditUser = (props) => {
717717
name="postExecution.psa"
718718
formControl={formControl}
719719
/>
720+
<CippFormComponent
721+
type="textField"
722+
fullWidth
723+
label="Reference"
724+
name="reference"
725+
placeholder="Enter a reference that will be added to the notification title"
726+
formControl={formControl}
727+
/>
720728
</Grid>
721729
</CippFormCondition>
722730
</Grid>

src/components/CippFormPages/CippSchedulerForm.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,16 @@ const CippSchedulerForm = (props) => {
568568
/>
569569
</Grid>
570570

571+
<Grid size={{ md: 12, xs: 12 }}>
572+
<CippFormComponent
573+
type="textField"
574+
name="reference"
575+
label="Reference"
576+
formControl={formControl}
577+
placeholder="Optional note to identify this task, this is also added to notification titles"
578+
/>
579+
</Grid>
580+
571581
{/* Divider */}
572582
<Grid size={{ md: 12, xs: 12 }}>
573583
<Divider sx={{ my: 2 }} />

src/components/CippWizard/CippWizardOffboarding.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@ export const CippWizardOffboarding = (props) => {
383383
formControl={formControl}
384384
/>
385385
</Grid>
386+
387+
<Grid size={{ sm: 12, xs: 12 }}>
388+
<CippFormComponent
389+
type="textField"
390+
fullWidth
391+
label="Reference"
392+
name="reference"
393+
placeholder="Enter a reference that will be added to the notification title and scheduled task"
394+
formControl={formControl}
395+
/>
396+
</Grid>
386397
</CippFormCondition>
387398
</Grid>
388399
</CardContent>

src/pages/cipp/scheduler/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const Page = () => {
7777
"Command",
7878
"Parameters",
7979
"PostExecution",
80+
"Reference",
8081
"Recurrence",
8182
"Results",
8283
]}

src/pages/tenant/conditional/deploy-vacation/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const Page = () => {
6262
"Tenant",
6363
"Name",
6464
"Parameters.Member",
65+
"Reference",
6566
"TaskState",
6667
"ScheduledTime",
6768
"ExecutedTime",
@@ -73,6 +74,7 @@ const Page = () => {
7374
"TaskState",
7475
"ScheduledTime",
7576
"Parameters.Member",
77+
"Reference",
7678
"Parameters.PolicyId",
7779
"Tenant",
7880
"ExecutedTime",

0 commit comments

Comments
 (0)