Open sunnyjindal opened 1 month ago
To make a draft, /api/v3/store-camp-statement
will be used with additional payload of
{
"is_draft": true,
"event_type": "create"
}
And in response, draft_record_id will be received
{
"status_code": 200,
"message": "Draft submitted successfully.",
"error": "",
"data": {
"draft_record_id": 3510
}
}
To autosave a draft, /api/v3/store-camp-statement
will be used with additional payload of
{
"is_draft": true,
"event_type": "edit",
"statement_id": "draft_record_id",
}
To Submit a draft as change, /api/v3/store-camp-statement
will be used with additional payload of
{
"is_draft": false,
"event_type": "create",
"statement_id": "draft_record_id",
}
@wahaj-hafeez use above API for autosave.
Ok ! @M-Darab
@wahaj-hafeez We need to address following issues while saving draft, 1- Restrict multiple API call on multi click on save as draft button. 2- Manage Statement button should be shown to direct supporter, when another direct supporter submits a change in statement. 3- "Sign Petition" UI issue is disabled view.
These issues are fixed 1- Restrict multiple API call on multi click on save as draft button. 2- Manage Statement button should be shown to direct supporter, when another direct supporter submits a change in statement. 3- "Sign Petition" UI issue is disabled view.
PR: https://github.com/the-canonizer/canonizer-3.0-frontend/pull/2065
While creating a camp statement, we should have the feature where camp statement is autosaved in the database. The camp statement will be saved in a draft mode unless published by the user.