diff --git a/frontend/components.d.ts b/frontend/components.d.ts index ec2677b1..585aa545 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -47,6 +47,8 @@ declare module 'vue' { Discussions: typeof import('./src/components/Discussions.vue')['default'] EditCoverImage: typeof import('./src/components/Modals/EditCoverImage.vue')['default'] EditProfile: typeof import('./src/components/Modals/EditProfile.vue')['default'] + EmailTemplateModal: typeof import('./src/components/Modals/EmailTemplateModal.vue')['default'] + EmailTemplates: typeof import('./src/components/EmailTemplates.vue')['default'] EmptyState: typeof import('./src/components/EmptyState.vue')['default'] EvaluationModal: typeof import('./src/components/Modals/EvaluationModal.vue')['default'] Evaluators: typeof import('./src/components/Evaluators.vue')['default'] diff --git a/frontend/src/components/BrandSettings.vue b/frontend/src/components/BrandSettings.vue index 56b9abe3..f988073b 100644 --- a/frontend/src/components/BrandSettings.vue +++ b/frontend/src/components/BrandSettings.vue @@ -18,11 +18,11 @@
-
- -
+
+
+
diff --git a/frontend/src/components/Categories.vue b/frontend/src/components/Categories.vue index 8a8eb80e..905839a1 100644 --- a/frontend/src/components/Categories.vue +++ b/frontend/src/components/Categories.vue @@ -49,11 +49,11 @@
{{ cat.category }} diff --git a/frontend/src/components/EmailTemplates.vue b/frontend/src/components/EmailTemplates.vue new file mode 100644 index 00000000..fa20e62d --- /dev/null +++ b/frontend/src/components/EmailTemplates.vue @@ -0,0 +1,136 @@ + + diff --git a/frontend/src/components/Modals/EmailTemplateModal.vue b/frontend/src/components/Modals/EmailTemplateModal.vue new file mode 100644 index 00000000..3721f792 --- /dev/null +++ b/frontend/src/components/Modals/EmailTemplateModal.vue @@ -0,0 +1,158 @@ + + diff --git a/frontend/src/components/Modals/Settings.vue b/frontend/src/components/Modals/Settings.vue index 60b0a2f5..18030ec1 100644 --- a/frontend/src/components/Modals/Settings.vue +++ b/frontend/src/components/Modals/Settings.vue @@ -51,8 +51,13 @@ :label="activeTab.label" :description="activeTab.description" /> + { label: 'Enable Learning Paths', name: 'enable_learning_paths', description: - 'This will enforce students to go through programs assigned to them in the correct order.', + 'This will ensure students follow the assigned programs in order.', type: 'checkbox', }, { @@ -139,11 +145,26 @@ const tabsStructure = computed(() => { 'If enabled, it sends google calendar invite to the student for evaluations.', type: 'checkbox', }, + { + type: 'Column Break', + }, + { + label: 'Batch Confirmation Template', + name: 'batch_confirmation_template', + doctype: 'Email Template', + type: 'Link', + }, + { + label: 'Certification Template', + name: 'certification_template', + doctype: 'Email Template', + type: 'Link', + }, { label: 'Unsplash Access Key', name: 'unsplash_access_key', description: - 'Optional. If this is set, students can pick a cover image from the unsplash library for their profile page. https://unsplash.com/documentation#getting-started.', + 'Allows users to pick a profile cover image from Unsplash. https://unsplash.com/documentation#getting-started.', type: 'password', }, ], @@ -155,11 +176,17 @@ const tabsStructure = computed(() => { hideLabel: true, items: [ { - label: 'Payment Gateway', + label: 'Payment', icon: 'DollarSign', description: 'Configure the payment gateway and other payment related settings', fields: [ + { + label: 'Default Currency', + name: 'default_currency', + type: 'Link', + doctype: 'Currency', + }, { label: 'Payment Gateway', name: 'payment_gateway', @@ -167,10 +194,7 @@ const tabsStructure = computed(() => { doctype: 'Payment Gateway', }, { - label: 'Default Currency', - name: 'default_currency', - type: 'Link', - doctype: 'Currency', + type: 'Column Break', }, { label: 'Apply GST for India', @@ -210,6 +234,11 @@ const tabsStructure = computed(() => { description: 'Double click to edit the category', icon: 'Network', }, + { + label: 'Email Templates', + description: 'Manage the email templates for your learning system', + icon: 'MailPlus', + }, ], }, { @@ -235,28 +264,6 @@ const tabsStructure = computed(() => { name: 'favicon', type: 'Upload', }, - { - label: 'Footer Logo', - name: 'footer_logo', - type: 'Upload', - }, - { - label: 'Address', - name: 'address', - type: 'textarea', - rows: 2, - }, - { - label: 'Footer "Powered By"', - name: 'footer_powered', - type: 'textarea', - rows: 4, - }, - { - label: 'Copyright', - name: 'copyright', - type: 'text', - }, ], }, { @@ -299,24 +306,6 @@ const tabsStructure = computed(() => { }, ], }, - { - label: 'Email Templates', - icon: 'MailPlus', - fields: [ - { - label: 'Batch Confirmation Template', - name: 'batch_confirmation_template', - doctype: 'Email Template', - type: 'Link', - }, - { - label: 'Certification Template', - name: 'certification_template', - doctype: 'Email Template', - type: 'Link', - }, - ], - }, { label: 'Signup', icon: 'LogIn', diff --git a/frontend/src/components/PaymentSettings.vue b/frontend/src/components/PaymentSettings.vue index b7a308ca..e53d76d4 100644 --- a/frontend/src/components/PaymentSettings.vue +++ b/frontend/src/components/PaymentSettings.vue @@ -12,13 +12,13 @@ /> -->
-
- +
+
@@ -60,9 +60,27 @@ const paymentGateway = createResource({ payment_gateway: props.data.doc.payment_gateway, } }, + transform(data) { + arrangeFields(data.fields) + }, auto: true, }) +const arrangeFields = (fields) => { + fields = data.fields.sort((a, b) => { + if (a.type === 'Upload' && b.type !== 'Upload') { + return 1 + } else if (a.type !== 'Upload' && b.type === 'Upload') { + return -1 + } + return 0 + }) + + fields.splice(3, 0, { + type: 'Column Break', + }) +} + const saveSettings = createResource({ url: 'frappe.client.set_value', makeParams(values) { diff --git a/frontend/src/components/SettingFields.vue b/frontend/src/components/SettingFields.vue index df9bebbd..8660596c 100644 --- a/frontend/src/components/SettingFields.vue +++ b/frontend/src/components/SettingFields.vue @@ -6,7 +6,7 @@
@@ -54,11 +55,11 @@