MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / handleSingleSubmit

Function handleSingleSubmit

frontend/src/components/forms/Recording.jsx:121–149  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

119 };
120
121 const handleSingleSubmit = async (values) => {
122 try {
123 setSubmitting(true);
124 const payload = buildSinglePayload(values);
125 if (recording && recording.id) {
126 await updateRecording(recording.id, payload);
127 showNotification({
128 title: 'Recording updated',
129 message: 'Recording schedule updated successfully',
130 color: 'green',
131 autoClose: 2500,
132 });
133 } else {
134 await createRecording(payload);
135 showNotification({
136 title: 'Recording scheduled',
137 message: 'One-time recording added to DVR queue',
138 color: 'green',
139 autoClose: 2500,
140 });
141 }
142 await fetchRecordings();
143 handleClose();
144 } catch (error) {
145 console.error('Failed to create recording', error);
146 } finally {
147 setSubmitting(false);
148 }
149 };
150
151 const handleRecurringSubmit = async (values) => {
152 try {

Callers

nothing calls this directly

Calls 5

buildSinglePayloadFunction · 0.90
updateRecordingFunction · 0.90
showNotificationFunction · 0.90
createRecordingFunction · 0.90
handleCloseFunction · 0.70

Tested by

no test coverage detected