Closed mikhail-vl closed 4 months ago
Please validate if there is more to update.
/** * Initial Request */ export const INITIAL_CODE_DEFAULT = `console.log(data, response, initial, elements); return; /** * Data Source * Requires form elements to be defined */ const dataQuery = toDataQueryResponse(response); console.log(dataQuery);`; /** * Update Request */ export const UPDATE_CODE_DEFAULT = `if (response && response.ok) { notifySuccess(['Update', 'Values updated successfully.']); locationService.reload(); } else { notifyError(['Update', 'An error occured updating values.']); }`; /** * Reset Request */ export const RESET_CODE_DEFAULT = `console.log(data, response, initial, elements);`; /** * Initial Payload */ export const INITIAL_PAYLOAD_DEFAULT = `return { rawSql: '', format: 'table', }`; /** * Update Payload */ export const UPDATE_PAYLOAD_DEFAULT = `const payload = {}; elements.forEach((element) => { if (!element.value) { return; } payload[element.id] = element.value; }) return payload; /** * Data Source payload */ return { rawSql: '', format: 'table', };`;
Please validate if there is more to update.