fix: added holiday, follow up related fields on sla doctype
This commit is contained in:
parent
27275426cf
commit
8187d17154
@ -1,8 +1,38 @@
|
|||||||
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
|
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
// frappe.ui.form.on("CRM Service Level Agreement", {
|
frappe.ui.form.on("CRM Service Level Agreement", {
|
||||||
// refresh(frm) {
|
// refresh(frm) {},
|
||||||
|
|
||||||
// },
|
apply_sla_for_follow_up: function (frm) {
|
||||||
// });
|
frm.trigger("toggle_follow_up_fields");
|
||||||
|
},
|
||||||
|
|
||||||
|
toggle_follow_up_fields: function (frm) {
|
||||||
|
if (cint(frm.doc.apply_sla_for_follow_up) === 1) {
|
||||||
|
frm.fields_dict.priorities.grid.update_docfield_property(
|
||||||
|
"follow_up_time",
|
||||||
|
"hidden",
|
||||||
|
0
|
||||||
|
);
|
||||||
|
frm.fields_dict.priorities.grid.update_docfield_property(
|
||||||
|
"follow_up_time",
|
||||||
|
"reqd",
|
||||||
|
1
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
frm.fields_dict.priorities.grid.update_docfield_property(
|
||||||
|
"follow_up_time",
|
||||||
|
"hidden",
|
||||||
|
1
|
||||||
|
);
|
||||||
|
frm.fields_dict.priorities.grid.update_docfield_property(
|
||||||
|
"follow_up_time",
|
||||||
|
"reqd",
|
||||||
|
0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
frm.refresh_field("priorities");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|||||||
@ -6,15 +6,25 @@
|
|||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"sla_name",
|
|
||||||
"apply_on",
|
"apply_on",
|
||||||
|
"column_break_uxua",
|
||||||
|
"sla_name",
|
||||||
"enabled",
|
"enabled",
|
||||||
"default",
|
"default",
|
||||||
"column_break_uxua",
|
"section_break_nevd",
|
||||||
|
"start_date",
|
||||||
|
"end_date",
|
||||||
|
"column_break_pzjg",
|
||||||
"condition",
|
"condition",
|
||||||
"section_break_ufaf",
|
"section_break_ufaf",
|
||||||
|
"apply_sla_for_follow_up",
|
||||||
"priorities",
|
"priorities",
|
||||||
|
"section_break_jlli",
|
||||||
|
"sla_fulfilled_on",
|
||||||
|
"column_break_faws",
|
||||||
|
"sla_paused_on",
|
||||||
"section_break_rmgo",
|
"section_break_rmgo",
|
||||||
|
"holiday_list",
|
||||||
"working_hours"
|
"working_hours"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -60,7 +70,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_ufaf",
|
"fieldname": "section_break_ufaf",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Response and Follow Up"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "priorities",
|
"fieldname": "priorities",
|
||||||
@ -71,7 +82,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_rmgo",
|
"fieldname": "section_break_rmgo",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Working Hours"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "working_hours",
|
"fieldname": "working_hours",
|
||||||
@ -79,11 +91,64 @@
|
|||||||
"label": "Working Hours",
|
"label": "Working Hours",
|
||||||
"options": "CRM Service Day",
|
"options": "CRM Service Day",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "apply_sla_for_follow_up",
|
||||||
|
"fieldname": "section_break_jlli",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Follow Up Conditions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "sla_fulfilled_on",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"label": "SLA Fulfilled On",
|
||||||
|
"options": "CRM SLA Fulfilled On Status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_faws",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "sla_paused_on",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"label": "SLA Paused On",
|
||||||
|
"options": "CRM Pause SLA On Status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_nevd",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Validity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "start_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"label": "Start Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_pzjg",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "end_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"label": "End Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "holiday_list",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Holiday List",
|
||||||
|
"options": "CRM Holiday List"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "apply_sla_for_follow_up",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Apply SLA for Follow Up"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-12-04 16:13:24.638239",
|
"modified": "2023-12-14 11:28:41.751377",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Service Level Agreement",
|
"name": "CRM Service Level Agreement",
|
||||||
|
|||||||
@ -7,8 +7,12 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"default_priority",
|
"default_priority",
|
||||||
|
"column_break_grod",
|
||||||
"priority",
|
"priority",
|
||||||
"first_response_time"
|
"section_break_anyl",
|
||||||
|
"first_response_time",
|
||||||
|
"column_break_bwgs",
|
||||||
|
"follow_up_time"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -32,12 +36,31 @@
|
|||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "First Response TIme",
|
"label": "First Response TIme",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_grod",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_anyl",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_bwgs",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "follow_up_time",
|
||||||
|
"fieldtype": "Duration",
|
||||||
|
"hidden": 1,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Follow Up Time"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-12-13 13:26:51.757839",
|
"modified": "2023-12-14 11:37:13.929628",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Service Level Priority",
|
"name": "CRM Service Level Priority",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user