Browse Source

Doc level UI Changes in QWIK and MST

version2
venkata akhil 1 year ago
parent
commit
5038b7fcdd
  1. 15
      smart_service/phase_2/doctype/instructions/instructions.json
  2. 28
      smart_service/phase_2/doctype/qwik_service/qwik_service.js
  3. 3
      smart_service/phase_2/doctype/qwik_service/qwik_service.json
  4. 61
      smart_service/phase_2/doctype/special_tool_information/special_tool_information.json

15
smart_service/phase_2/doctype/instructions/instructions.json

@ -9,17 +9,20 @@
"step_name",
"content_type",
"content",
"attach_file"
"attach_file",
"title"
],
"fields": [
{
"fieldname": "step_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Step Name"
},
{
"fieldname": "content_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Content Type",
"options": "Heading\nDescription\nCaution\nWarning\nImage\nVideo\nPDF",
"read_only_depends_on": "// eval:doc.content_type == 'PDF'",
@ -28,18 +31,26 @@
{
"fieldname": "content",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Content"
},
{
"fieldname": "attach_file",
"fieldtype": "Attach",
"in_list_view": 1,
"label": "Attach File"
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2023-09-26 11:27:34.468690",
"modified": "2023-09-27 15:21:21.158532",
"modified_by": "Administrator",
"module": "Phase-2",
"name": "Instructions",

28
smart_service/phase_2/doctype/qwik_service/qwik_service.js

@ -67,20 +67,20 @@ frappe.ui.form.on('Qwik Service', {
vehicle: function(frm){
set_display_order(frm)
},
// variant: function (frm) {
// frappe.call({
// method: "smart_service.phase_2.doctype.qwik_service.qwik_service.get_kilometer",
// args: {
// vehicle: frm.doc.vehicle,
// service_kilometers: frm.doc.service_kilometers
// },
// callback: function (r) {
// console.log(r.message)
// frm.set_df_property('kilometers', 'options', r.message);
// frm.refresh_field('kilometers')
// }
// })
// },
variant: function (frm) {
frappe.call({
method: "smart_service.phase_2.doctype.qwik_service.qwik_service.get_kilometer",
args: {
vehicle: frm.doc.vehicle,
service_kilometers: frm.doc.service_kilometers
},
callback: function (r) {
console.log(r.message)
frm.set_df_property('kilometers', 'options', r.message);
frm.refresh_field('kilometers')
}
})
},
});
function custom_tab_html(frm){

3
smart_service/phase_2/doctype/qwik_service/qwik_service.json

@ -37,6 +37,7 @@
"set_only_once": 1
},
{
"depends_on": "eval:doc.variant;",
"fieldname": "kilometers",
"fieldtype": "Select",
"in_list_view": 1,
@ -142,7 +143,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-09-22 13:05:24.032814",
"modified": "2023-09-28 10:45:37.763086",
"modified_by": "Administrator",
"module": "Phase-2",
"name": "Qwik Service",

61
smart_service/phase_2/doctype/special_tool_information/special_tool_information.json

@ -15,17 +15,22 @@
"column_break_m3p9i",
"category",
"aggregate_name",
"aggregate_image",
"tool_image",
"column_break_whk88",
"tool_type",
"tool_name",
"my_id",
"section_break_e91wx",
"instructions",
"teb_instructions",
"section_break_2etis",
"keywords",
"column_break_witqs",
"pdf",
"column_break_plwrg",
"image",
"tool_name",
"tool_type"
"column_break_uq15d",
"video",
"section_break_e91wx",
"instructions",
"teb_instructions"
],
"fields": [
{
@ -77,16 +82,19 @@
"options": "Active\nInactive"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "keywords",
"fieldtype": "Small Text",
"label": "Keywords"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "keywords",
"fieldtype": "Small Text",
"label": "Keywords"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "aggregate_name",
"fieldtype": "Data",
"label": "Aggregate Name",
@ -102,11 +110,7 @@
"set_only_once": 1
},
{
"fieldname": "aggregate_image",
"fieldtype": "Attach Image",
"label": "Aggregate Image"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "pdf",
"fieldtype": "Attach",
"label": "PDF"
@ -118,10 +122,10 @@
"options": "Instructions"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "tool_name",
"fieldtype": "Data",
"label": "Tool Name",
"reqd": 1
"label": "Tool Name"
},
{
"fieldname": "tool_type",
@ -137,6 +141,7 @@
"options": "TEB Instructions"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "image",
"fieldtype": "Attach Image",
"label": "Image"
@ -144,11 +149,39 @@
{
"fieldname": "column_break_m3p9i",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_2etis",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_witqs",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_plwrg",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_uq15d",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "video",
"fieldtype": "Attach",
"label": "Video"
},
{
"fieldname": "tool_image",
"fieldtype": "Attach Image",
"label": "Tool Image",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-09-27 11:59:38.479380",
"modified": "2023-09-28 10:22:26.174524",
"modified_by": "Administrator",
"module": "Phase-2",
"name": "Special Tool Information",

Loading…
Cancel
Save