diff --git a/crm/api/doc.py b/crm/api/doc.py index 8505a7a8..e0a0da26 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -332,7 +332,8 @@ def get_data( for kc in kanban_columns: column_filters = { column_field: kc.get('name') } - if column_field in filters and filters.get(column_field) != kc.name: + order = kc.get("order") + if column_field in filters and filters.get(column_field) != kc.name or kc.get('delete'): column_data = [] else: column_filters.update(filters.copy()) @@ -341,7 +342,6 @@ def get_data( if kc.get("page_length"): page_length = kc.get("page_length") - order = kc.get("order") if order: column_data = get_records_based_on_order(doctype, rows, column_filters, page_length, order) else: @@ -667,9 +667,6 @@ def get_fields(doctype: str, allow_all_fieldtypes: bool = False): for field in fields: if ( field.fieldtype not in not_allowed_fieldtypes - and not field.hidden - and not field.read_only - and not field.is_virtual and field.fieldname ): _fields.append({ @@ -678,6 +675,8 @@ def get_fields(doctype: str, allow_all_fieldtypes: bool = False): "value": field.fieldname, "options": field.options, "mandatory": field.reqd, + "read_only": field.read_only, + "hidden": field.hidden, }) return _fields diff --git a/crm/fcrm/doctype/twilio_settings/twilio_settings.json b/crm/fcrm/doctype/twilio_settings/twilio_settings.json index 24567b4a..e32ca05f 100644 --- a/crm/fcrm/doctype/twilio_settings/twilio_settings.json +++ b/crm/fcrm/doctype/twilio_settings/twilio_settings.json @@ -11,13 +11,15 @@ "enabled", "column_break_avmt", "record_calls", - "section_break_malx", + "section_break_eklq", "account_sid", - "api_key", - "api_secret", - "column_break_idds", + "column_break_yqvr", "auth_token", - "twiml_sid" + "section_break_malx", + "api_key", + "twiml_sid", + "column_break_idds", + "api_secret" ], "fields": [ { @@ -31,13 +33,15 @@ "fieldname": "api_key", "fieldtype": "Data", "label": "API Key", - "permlevel": 1 + "permlevel": 1, + "read_only": 1 }, { "fieldname": "api_secret", "fieldtype": "Password", "label": "API Secret", - "permlevel": 1 + "permlevel": 1, + "read_only": 1 }, { "fieldname": "column_break_idds", @@ -54,7 +58,8 @@ "fieldname": "twiml_sid", "fieldtype": "Data", "label": "TwiML SID", - "permlevel": 1 + "permlevel": 1, + "read_only": 1 }, { "fieldname": "section_break_ssqj", @@ -79,12 +84,20 @@ "fieldname": "enabled", "fieldtype": "Check", "label": "Enabled" + }, + { + "fieldname": "section_break_eklq", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_yqvr", + "fieldtype": "Column Break" } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-06-11 17:42:38.256260", + "modified": "2024-07-01 17:55:25.003703", "modified_by": "Administrator", "module": "FCRM", "name": "Twilio Settings", diff --git a/crm/install.py b/crm/install.py index cd36f1f6..1cbdb66d 100644 --- a/crm/install.py +++ b/crm/install.py @@ -16,6 +16,8 @@ def after_install(): add_default_fields_layout() add_property_setter() add_email_template_custom_fields() + add_default_industries() + add_default_lead_sources() frappe.db.commit() def add_default_lead_statuses(): @@ -196,3 +198,28 @@ def add_email_template_custom_fields(): ) frappe.clear_cache(doctype="Email Template") + + +def add_default_industries(): + industries = ["Accounting", "Advertising", "Aerospace", "Agriculture", "Airline", "Apparel & Accessories", "Automotive", "Banking", "Biotechnology", "Broadcasting", "Brokerage", "Chemical", "Computer", "Consulting", "Consumer Products", "Cosmetics", "Defense", "Department Stores", "Education", "Electronics", "Energy", "Entertainment & Leisure, Executive Search", "Financial Services", "Food", "Beverage & Tobacco", "Grocery", "Health Care", "Internet Publishing", "Investment Banking", "Legal", "Manufacturing", "Motion Picture & Video", "Music", "Newspaper Publishers", "Online Auctions", "Pension Funds", "Pharmaceuticals", "Private Equity", "Publishing", "Real Estate", "Retail & Wholesale", "Securities & Commodity Exchanges", "Service", "Soap & Detergent", "Software", "Sports", "Technology", "Telecommunications", "Television", "Transportation", "Venture Capital"] + + for industry in industries: + if frappe.db.exists("CRM Industry", industry): + continue + + doc = frappe.new_doc("CRM Industry") + doc.industry = industry + doc.insert() + + +def add_default_lead_sources(): + + lead_sources = ["Existing Customer", "Reference", "Advertisement", "Cold Calling", "Exhibition", "Supplier Reference", "Mass Mailing", "Customer's Vendor", "Campaign", "Walk In"] + + for source in lead_sources: + if frappe.db.exists("CRM Lead Source", source): + continue + + doc = frappe.new_doc("CRM Lead Source") + doc.source_name = source + doc.insert() diff --git a/frappe-ui b/frappe-ui index 0c0212cc..b5cc6c0c 160000 --- a/frappe-ui +++ b/frappe-ui @@ -1 +1 @@ -Subproject commit 0c0212cc5bbac151cffc6dc73dfbdf7b69d45ec2 +Subproject commit b5cc6c0cd36ee25e8e945e8c91d8b5c035fb5e44 diff --git a/frontend/package.json b/frontend/package.json index 7a839c81..4f46436b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,7 +13,7 @@ "@vueuse/core": "^10.3.0", "@vueuse/integrations": "^10.3.0", "feather-icons": "^4.28.0", - "frappe-ui": "^0.1.61", + "frappe-ui": "^0.1.63", "gemoji": "^8.1.0", "lodash": "^4.17.21", "mime": "^4.0.1", diff --git a/frontend/src/components/Fields.vue b/frontend/src/components/Fields.vue index 238b3ada..fe723d8b 100644 --- a/frontend/src/components/Fields.vue +++ b/frontend/src/components/Fields.vue @@ -21,153 +21,174 @@ " >