Browse Source

Circular: AttachImage field, Refresh token: device if field

master
venkataakhil 1 year ago
parent
commit
bd893c51f9
  1. 5
      smart_service/add_ons/doctype/circular/circular.json
  2. 10
      smart_service/add_ons/doctype/refresh_token/refresh_token.json
  3. 3
      smart_service/apis/support.py

5
smart_service/add_ons/doctype/circular/circular.json

@ -66,14 +66,13 @@
},
{
"fieldname": "circular_image",
"fieldtype": "Attach",
"fieldtype": "Attach Image",
"label": "Circular Image"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-05-14 12:07:39.981829",
"modified": "2023-06-24 10:44:00.723062",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Circular",

10
smart_service/add_ons/doctype/refresh_token/refresh_token.json

@ -11,7 +11,8 @@
"column_break_3",
"access_expiry_time",
"refresh_expiry_time",
"user"
"user",
"device_id"
],
"fields": [
{
@ -43,11 +44,16 @@
"fieldtype": "Link",
"label": "User",
"options": "User"
},
{
"fieldname": "device_id",
"fieldtype": "Data",
"label": "Device ID"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-02-02 11:54:48.885036",
"modified": "2023-06-24 12:22:02.491908",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Refresh Token",

3
smart_service/apis/support.py

@ -435,11 +435,12 @@ def circular_api():
else:
i["status"] = False
return api
@frappe.whitelist(allow_guest=1)
def get_kms_mapping(sub_system,variant):
try:
data = frappe.db.sql(f'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable
FROM `tabKilometer Mapping_Items` where sub_systems="{sub_system}" and parent LIKE "{variant}" order by kilometer_IDX;''')
FROM `tabKilometer Mapping_Items` where sub_systems="{sub_system}" and parent LIKE "{variant}" order by kilometer_IDX;''',as_dict=1)
return data
except Exception as e:
return e
Loading…
Cancel
Save