create tempalte functionality

This commit is contained in:
Casey 2026-01-02 16:28:57 -06:00
parent cb59dd65ca
commit 97241f14ea
4 changed files with 213 additions and 41 deletions

View file

@ -13,6 +13,7 @@ const FRAPPE_SEND_ESTIMATE_EMAIL_METHOD = "custom_ui.api.db.estimates.send_estim
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";
const FRAPPE_GET_ESTIMATE_TEMPLATES_METHOD = "custom_ui.api.db.estimates.get_estimate_templates";
const FRAPPE_CREATE_ESTIMATE_TEMPLATE_METHOD = "custom_ui.api.db.estimates.create_estimate_template";
// Job methods
const FRAPPE_GET_JOB_METHOD = "custom_ui.api.db.jobs.get_job";
const FRAPPE_GET_JOBS_METHOD = "custom_ui.api.db.jobs.get_jobs_table_data";
@ -227,6 +228,10 @@ class Api {
return await this.request(FRAPPE_GET_ESTIMATE_TEMPLATES_METHOD, { company });
}
static async createEstimateTemplate(data) {
return await this.request(FRAPPE_CREATE_ESTIMATE_TEMPLATE_METHOD, { data });
}
// ============================================================================
// JOB / PROJECT METHODS
// ============================================================================