From 65b047c9f180509a38e7d09e0b5a37733ccfe2a8 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 12:48:28 +0530 Subject: [PATCH 1/9] chore: updated readme with whatsapp integration --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e900aec..a7fe6885 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,11 @@ - **Tasks:** Create tasks for leads and deals. - **Notes:** Add notes to leads and deals. - **Call Logs:** See the call logs with call details and recordings. -- **Twilio Integration:** Integrate Twilio to make and receive calls from the CRM. + +## Integrations + +- **Twilio:** Integrate Twilio to make and receive calls from the CRM. You can also record calls. It is a built-in integration. +- **WhatsApp:** Integrate WhatsApp to send and receive messages from the CRM. [Frappe WhatsApp](https://github.com/shridarpatil/frappe_whatsapp) is used for this integration. ## Getting Started From f1f0ac746146086da3d941df00af5dcebc69b916 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 13:38:55 +0530 Subject: [PATCH 2/9] fix: mobile no was not created when contact is created --- frontend/src/components/Modals/ContactModal.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Modals/ContactModal.vue b/frontend/src/components/Modals/ContactModal.vue index 4682ef58..dc2d2f1e 100644 --- a/frontend/src/components/Modals/ContactModal.vue +++ b/frontend/src/components/Modals/ContactModal.vue @@ -219,9 +219,9 @@ async function callInsertDoc() { delete _contact.value.email_id } - if (_contact.value.mobile_no) { - _contact.value.phone_nos = [{ phone: _contact.value.mobile_no }] - delete _contact.value.mobile_no + if (_contact.value.actual_mobile_no) { + _contact.value.phone_nos = [{ phone: _contact.value.actual_mobile_no }] + delete _contact.value.actual_mobile_no } const doc = await call('frappe.client.insert', { From 120593ca33bfb10cf4b81212a5f825dbe5bd61b3 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 15:33:17 +0530 Subject: [PATCH 3/9] fix: default user should be Administrator not admin --- frontend/src/stores/users.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/stores/users.js b/frontend/src/stores/users.js index c046ec8e..1aa61819 100644 --- a/frontend/src/stores/users.js +++ b/frontend/src/stores/users.js @@ -17,6 +17,9 @@ export const usersStore = defineStore('crm-users', () => { auto: true, transform(users) { for (let user of users) { + if (user.name === 'Administrator') { + user.email = 'Administrator' + } usersByName[user.name] = user } return users From bd4854966e76d9b7896bcac6962dc2b9fabf0e67 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 18:19:47 +0530 Subject: [PATCH 4/9] fix: lead/deal status not getting set on create --- frontend/src/components/Modals/DealModal.vue | 3 --- frontend/src/components/Modals/LeadModal.vue | 3 --- 2 files changed, 6 deletions(-) diff --git a/frontend/src/components/Modals/DealModal.vue b/frontend/src/components/Modals/DealModal.vue index f48cfbc8..1eb3e893 100644 --- a/frontend/src/components/Modals/DealModal.vue +++ b/frontend/src/components/Modals/DealModal.vue @@ -323,9 +323,6 @@ function createDeal() { } onMounted(() => { - if (!deal.status) { - deal.status = computed(() => getDealStatus().name) - } if (!deal.deal_owner) { deal.deal_owner = getUser().email } diff --git a/frontend/src/components/Modals/LeadModal.vue b/frontend/src/components/Modals/LeadModal.vue index a3f87769..12712848 100644 --- a/frontend/src/components/Modals/LeadModal.vue +++ b/frontend/src/components/Modals/LeadModal.vue @@ -291,9 +291,6 @@ function createNewLead() { } onMounted(() => { - if (!lead.status) { - lead.status = computed(() => getLeadStatus().name) - } if (!lead.lead_owner) { lead.lead_owner = getUser().email } From 8fa9ee054fe983a1966855692890e31678a6e363 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 18:59:30 +0530 Subject: [PATCH 5/9] fix: Fields component which handle different fieldtypes within sections --- frontend/src/components/Fields.vue | 147 +++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 frontend/src/components/Fields.vue diff --git a/frontend/src/components/Fields.vue b/frontend/src/components/Fields.vue new file mode 100644 index 00000000..832e71c9 --- /dev/null +++ b/frontend/src/components/Fields.vue @@ -0,0 +1,147 @@ + + + + + From b05f246afcdbe0df2a65625b307b2a1344e0795e Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 19:00:04 +0530 Subject: [PATCH 6/9] fix: added grid-cols pattern for dynamic sections --- frontend/tailwind.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 077d1161..da6bf60a 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -6,7 +6,10 @@ module.exports = { './node_modules/frappe-ui/src/components/**/*.{vue,js,ts,jsx,tsx}', '../node_modules/frappe-ui/src/components/**/*.{vue,js,ts,jsx,tsx}', ], - safelist: [{ pattern: /!(text|bg)-/, variants: ['hover', 'active'] }], + safelist: [ + { pattern: /!(text|bg)-/, variants: ['hover', 'active'] }, + { pattern: /^grid-cols-/ }, + ], theme: { extend: {}, }, From 5205fedeac63d036c5a83e3e5caa9eec0b7e8cbe Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Apr 2024 19:01:01 +0530 Subject: [PATCH 7/9] fix: used Fields component in Lead/Deal/Contact/Organization Modal to render fields --- .../src/components/Modals/ContactModal.vue | 157 +++++------------- frontend/src/components/Modals/DealModal.vue | 83 +-------- frontend/src/components/Modals/LeadModal.vue | 87 +--------- .../components/Modals/OrganizationModal.vue | 154 +++++++++-------- 4 files changed, 130 insertions(+), 351 deletions(-) diff --git a/frontend/src/components/Modals/ContactModal.vue b/frontend/src/components/Modals/ContactModal.vue index dc2d2f1e..335380b0 100644 --- a/frontend/src/components/Modals/ContactModal.vue +++ b/frontend/src/components/Modals/ContactModal.vue @@ -57,82 +57,7 @@
{{ field.value }}
-
-
-
- -
- - - - - -
- -
-
-
+
@@ -152,8 +77,7 @@ - - diff --git a/frontend/src/components/Modals/LeadModal.vue b/frontend/src/components/Modals/LeadModal.vue index 12712848..25d21224 100644 --- a/frontend/src/components/Modals/LeadModal.vue +++ b/frontend/src/components/Modals/LeadModal.vue @@ -7,72 +7,7 @@ }" > - - diff --git a/frontend/src/components/Modals/OrganizationModal.vue b/frontend/src/components/Modals/OrganizationModal.vue index 59aad934..0816f7e7 100644 --- a/frontend/src/components/Modals/OrganizationModal.vue +++ b/frontend/src/components/Modals/OrganizationModal.vue @@ -35,78 +35,7 @@
{{ field.value }}
-
-
- -
- - -
- -
- - -
-
-
+
@@ -126,11 +55,11 @@