diff --git a/custom_ui/commands.py b/custom_ui/commands.py index 2faee1d..1ce5c87 100644 --- a/custom_ui/commands.py +++ b/custom_ui/commands.py @@ -4,6 +4,7 @@ import subprocess import frappe from custom_ui.utils import create_module from custom_ui.api.db.general import search_any_field +from custom_ui.install import create_companies, create_project_templates, create_task_types, create_tasks, create_bid_meeting_note_form_templates @click.command("update-data") @click.option("--site", default=None, help="Site to update data for") @@ -100,5 +101,9 @@ def build_frontend(site): def create_module_command(): create_module() click.echo("✅ Custom UI module created or already exists.") + +def setup_custom_ui(): + pass + commands = [build_frontend, create_module_command] \ No newline at end of file diff --git a/custom_ui/custom_ui/doctype/address_company_link/__init__.py b/custom_ui/custom_ui/doctype/address_company_link/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/custom_ui/custom_ui/doctype/address_company_link/address_company_link.json b/custom_ui/custom_ui/doctype/address_company_link/address_company_link.json new file mode 100644 index 0000000..18a2cf5 --- /dev/null +++ b/custom_ui/custom_ui/doctype/address_company_link/address_company_link.json @@ -0,0 +1,37 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2026-02-18 05:53:09.935695", + "custom": 1, + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "company" + ], + "fields": [ + { + "fieldname": "company", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Company", + "options": "Company", + "reqd": 1 + } + ], + "grid_page_length": 50, + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2026-02-18 13:24:00.502036", + "modified_by": "casey@shilohcode.com", + "module": "Custom UI", + "name": "Address Company Link", + "owner": "Administrator", + "permissions": [], + "row_format": "Dynamic", + "rows_threshold_for_grid_search": 20, + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.js b/custom_ui/custom_ui/doctype/service_address_2/service_address_2.js deleted file mode 100644 index 733839d..0000000 --- a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2026, Shiloh Code LLC and contributors -// For license information, please see license.txt - -// frappe.ui.form.on("Service Address 2", { -// refresh(frm) { - -// }, -// }); diff --git a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.json b/custom_ui/custom_ui/doctype/service_address_2/service_address_2.json index 436e2b0..4a98a41 100644 --- a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.json +++ b/custom_ui/custom_ui/doctype/service_address_2/service_address_2.json @@ -1,7 +1,8 @@ { "actions": [], "allow_rename": 1, - "creation": "2026-01-30 07:01:57.571003", + "creation": "2026-02-18 05:53:10.416092", + "custom": 1, "doctype": "DocType", "engine": "InnoDB", "field_order": [ @@ -19,7 +20,9 @@ "customer", "company", "service_address", - "foreman" + "foreman", + "ready_to_schedule", + "skip_days" ], "fields": [ { @@ -113,12 +116,24 @@ "fieldtype": "Link", "label": "Foreman", "options": "Employee" + }, + { + "default": "1", + "fieldname": "ready_to_schedule", + "fieldtype": "Check", + "label": "Ready To Schedule" + }, + { + "fieldname": "skip_days", + "fieldtype": "Table", + "label": "Skip Days", + "options": "Skip Day" } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2026-01-30 07:15:39.410145", + "modified": "2026-02-18 05:53:10.467828", "modified_by": "Administrator", "module": "Custom UI", "name": "Service Address 2", diff --git a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.py b/custom_ui/custom_ui/doctype/service_address_2/service_address_2.py deleted file mode 100644 index 8411c3a..0000000 --- a/custom_ui/custom_ui/doctype/service_address_2/service_address_2.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2026, Shiloh Code LLC and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class ServiceAddress2(Document): - pass diff --git a/custom_ui/custom_ui/doctype/service_address_2/test_service_address_2.py b/custom_ui/custom_ui/doctype/service_address_2/test_service_address_2.py deleted file mode 100644 index 8c60c43..0000000 --- a/custom_ui/custom_ui/doctype/service_address_2/test_service_address_2.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2026, Shiloh Code LLC and Contributors -# See license.txt - -# import frappe -from frappe.tests.utils import FrappeTestCase - - -class TestServiceAddress2(FrappeTestCase): - pass diff --git a/frontend/src/components/pages/Client.vue b/frontend/src/components/pages/Client.vue index 907ff41..5416acf 100644 --- a/frontend/src/components/pages/Client.vue +++ b/frontend/src/components/pages/Client.vue @@ -389,7 +389,9 @@ const handleSubmit = async () => { } const addressesExist = await Api.checkAddressesExist(client.value.addresses); const contactsExist = await Api.checkContactsExist(client.value.contacts); - if (addressesExist || contactsExist) { + console.log("Address existence check:", addressesExist); + console.log("Contact existence check:", contactsExist); + if (addressesExist.length > 0 || contactsExist.length > 0) { // existingAddresses.value = Array.isArray(addressesExist) ? addressesExist : []; // existingContacts.value = Array.isArray(contactsExist) ? contactsExist : []; showExistingModal.value = true;