Added the Confirm Estimate reponse in the UI.

This commit is contained in:
rocketdebris 2025-12-22 16:35:03 -05:00
parent 20a3517d7b
commit d30fc77527
3 changed files with 70 additions and 21 deletions

View file

@ -11,6 +11,7 @@ const FRAPPE_GET_ESTIMATES_METHOD = "custom_ui.api.db.estimates.get_estimate_tab
const FRAPPE_GET_ESTIMATE_BY_ADDRESS_METHOD = "custom_ui.api.db.estimates.get_estimate_from_address";
const FRAPPE_SEND_ESTIMATE_EMAIL_METHOD = "custom_ui.api.db.estimates.send_estimate_email";
const FRAPPE_LOCK_ESTIMATE_METHOD = "custom_ui.api.db.estimates.lock_estimate";
const FRAPPE_ESTIMATE_UPDATE_RESPONSE_METHOD = "custom_ui.api.db.estimates.manual_response";
// Job methods
const FRAPPE_GET_JOBS_METHOD = "custom_ui.api.db.get_jobs";
const FRAPPE_UPSERT_JOB_METHOD = "custom_ui.api.db.jobs.upsert_job";
@ -203,6 +204,10 @@ class Api {
return await this.request(FRAPPE_LOCK_ESTIMATE_METHOD, { estimateName });
}
static async updateEstimateResponse(estimateName, response) {
return await this.request(FRAPPE_ESTIMATE_UPDATE_RESPONSE_METHOD, {name: estimateName, response});
}
// ============================================================================
// JOB / PROJECT METHODS
// ============================================================================