Added a rough and dirty Job page and the JS API methods for it.
This commit is contained in:
parent
d4240e0cc3
commit
9c837deb52
2 changed files with 176 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ const FRAPPE_ESTIMATE_UPDATE_RESPONSE_METHOD = "custom_ui.api.db.estimates.manua
|
|||
// 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";
|
||||
const FRAPPE_GET_JOB_TASK_LIST_METHOD = "custom_ui.api.db.get_job_task_list";
|
||||
// Invoice methods
|
||||
const FRAPPE_GET_INVOICES_METHOD = "custom_ui.api.db.invoices.get_invoice_table_data";
|
||||
const FRAPPE_UPSERT_INVOICE_METHOD = "custom_ui.api.db.invoices.upsert_invoice";
|
||||
|
|
@ -267,6 +268,19 @@ class Api {
|
|||
return result;
|
||||
}
|
||||
|
||||
static async getJobTaskList(jobName) {
|
||||
if (frappe.db.exists("Project", jobName) {
|
||||
const result = await request(FRAPPE_GET_JOB_TASK_LIST_METHOD, { data: jobName )
|
||||
console.log(`DEBUG: API - retrieved task list from job ${jobName}:`, result);
|
||||
return result
|
||||
}
|
||||
else {
|
||||
console.log(`DEBUG: API - no record found for task like from job ${jobName}: `, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// INVOICE / PAYMENT METHODS
|
||||
// ============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue