From d9a2d7098a1578ed8fc00d5f7969bad5d3a9c9b0 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 2 May 2024 14:33:18 +0530 Subject: [PATCH 1/5] fix: show call log details in modal --- crm/fcrm/doctype/crm_call_log/crm_call_log.py | 4 + .../src/components/Icons/CheckCircleIcon.vue | 23 +++ .../components/ListViews/CallLogsListView.vue | 5 +- .../src/components/Modals/CallLogModal.vue | 185 ++++++++++++++++++ frontend/src/pages/CallLogs.vue | 45 +++++ 5 files changed, 258 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/Icons/CheckCircleIcon.vue create mode 100644 frontend/src/components/Modals/CallLogModal.vue diff --git a/crm/fcrm/doctype/crm_call_log/crm_call_log.py b/crm/fcrm/doctype/crm_call_log/crm_call_log.py index 0147b9ac..132e9a4a 100644 --- a/crm/fcrm/doctype/crm_call_log/crm_call_log.py +++ b/crm/fcrm/doctype/crm_call_log/crm_call_log.py @@ -69,6 +69,10 @@ class CRMCallLog(Document): "duration", "from", "to", + "note", + "recording_url", + "reference_doctype", + "reference_docname", "creation", ] return {'columns': columns, 'rows': rows} diff --git a/frontend/src/components/Icons/CheckCircleIcon.vue b/frontend/src/components/Icons/CheckCircleIcon.vue new file mode 100644 index 00000000..5daed8c7 --- /dev/null +++ b/frontend/src/components/Icons/CheckCircleIcon.vue @@ -0,0 +1,23 @@ + diff --git a/frontend/src/components/ListViews/CallLogsListView.vue b/frontend/src/components/ListViews/CallLogsListView.vue index 7ccd86a6..b8302a50 100644 --- a/frontend/src/components/ListViews/CallLogsListView.vue +++ b/frontend/src/components/ListViews/CallLogsListView.vue @@ -3,10 +3,7 @@ :columns="columns" :rows="rows" :options="{ - getRowRoute: (row) => ({ - name: 'Call Log', - params: { callLogId: row.name }, - }), + onRowClick: (row) => emit('showCallLog', row.name), selectable: options.selectable, showTooltip: options.showTooltip, resizeColumn: options.resizeColumn, diff --git a/frontend/src/components/Modals/CallLogModal.vue b/frontend/src/components/Modals/CallLogModal.vue new file mode 100644 index 00000000..3aa7c4a8 --- /dev/null +++ b/frontend/src/components/Modals/CallLogModal.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/frontend/src/pages/CallLogs.vue b/frontend/src/pages/CallLogs.vue index 28bb5983..280c11a4 100644 --- a/frontend/src/pages/CallLogs.vue +++ b/frontend/src/pages/CallLogs.vue @@ -31,6 +31,7 @@ rowCount: callLogs.data.row_count, totalCount: callLogs.data.total_count, }" + @showCallLog="showCallLog" @loadMore="() => loadMore++" @columnWidthUpdated="() => triggerResize++" @updatePageCount="(count) => (updatedPageCount = count)" @@ -47,6 +48,11 @@ {{ __('No Logs Found') }} + diff --git a/frontend/src/router.js b/frontend/src/router.js index 7e69658d..901324c8 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -72,12 +72,6 @@ const routes = [ component: () => import('@/pages/CallLogs.vue'), meta: { scrollPos: { top: 0, left: 0 } }, }, - { - path: '/call-logs/:callLogId', - name: 'Call Log', - component: () => import('@/pages/CallLog.vue'), - props: true, - }, { path: '/email-templates', name: 'Email Templates',