diff --git a/frontend/src/pages/Lead.vue b/frontend/src/pages/Lead.vue index 652182856..c5952efbf 100644 --- a/frontend/src/pages/Lead.vue +++ b/frontend/src/pages/Lead.vue @@ -67,122 +67,141 @@ :style="{ left: `${indicatorLeftValue}px` }" /> - - + + -
-
- -
- {{ section.label }} - -
- -
-
-
{{ field.label }}
-
- - - - - - - - - - - - +
+
+
+ +
+ {{ section.label }} + +
+ +
+
+
{{ field.label }}
+
+ + + + + + + + + + + + +
-
- - + + +
+
+
+ Created + + {{ timeAgo(lead.doc.creation) }} + +  ·  + Updated + + {{ timeAgo(lead.doc.modified) }} +
@@ -209,6 +228,7 @@ import { } from 'frappe-ui' import { TransitionPresets, useTransition } from '@vueuse/core' import { usersStore } from '@/stores/users' +import { dateFormat, timeAgo } from '@/utils' import { ref, computed, h } from 'vue' import Breadcrumbs from '@/components/Breadcrumbs.vue' diff --git a/frontend/src/utils.js b/frontend/src/utils.js new file mode 100644 index 000000000..b9cc8688d --- /dev/null +++ b/frontend/src/utils.js @@ -0,0 +1,10 @@ +import { useDateFormat, useTimeAgo } from '@vueuse/core' + +export function dateFormat(date, format) { + const _format = format || 'DD-MM-YYYY HH:mm:ss' + return useDateFormat(date, _format).value +} + +export function timeAgo(date) { + return useTimeAgo(date).value +}