refactor: CurrencySettings component
(cherry picked from commit 186584c1ac79170afa4ef8860bff9d3d3d91cadc)
This commit is contained in:
parent
1962b9a103
commit
e10ec543a7
2
frontend/components.d.ts
vendored
2
frontend/components.d.ts
vendored
@ -63,7 +63,7 @@ declare module 'vue' {
|
|||||||
CountUpTimer: typeof import('./src/components/CountUpTimer.vue')['default']
|
CountUpTimer: typeof import('./src/components/CountUpTimer.vue')['default']
|
||||||
CreateDocumentModal: typeof import('./src/components/Modals/CreateDocumentModal.vue')['default']
|
CreateDocumentModal: typeof import('./src/components/Modals/CreateDocumentModal.vue')['default']
|
||||||
CRMLogo: typeof import('./src/components/Icons/CRMLogo.vue')['default']
|
CRMLogo: typeof import('./src/components/Icons/CRMLogo.vue')['default']
|
||||||
CurrencySettings: typeof import('./src/components/Settings/General/CurrencySettings.vue')['default']
|
CurrencySettings: typeof import('./src/components/Settings/CurrencySettings.vue')['default']
|
||||||
CustomActions: typeof import('./src/components/CustomActions.vue')['default']
|
CustomActions: typeof import('./src/components/CustomActions.vue')['default']
|
||||||
DashboardGrid: typeof import('./src/components/Dashboard/DashboardGrid.vue')['default']
|
DashboardGrid: typeof import('./src/components/Dashboard/DashboardGrid.vue')['default']
|
||||||
DashboardIcon: typeof import('./src/components/Icons/DashboardIcon.vue')['default']
|
DashboardIcon: typeof import('./src/components/Icons/DashboardIcon.vue')['default']
|
||||||
|
|||||||
@ -1,22 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex h-full flex-col gap-6 px-6 py-8 text-ink-gray-8">
|
<div class="flex h-full flex-col gap-6 px-6 py-8 text-ink-gray-8">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="flex px-2 justify-between">
|
<div class="flex justify-between px-2 text-ink-gray-8">
|
||||||
<div class="flex items-center gap-1 -ml-4 w-9/12">
|
<div class="flex flex-col gap-1">
|
||||||
<Button
|
<h2 class="flex gap-2 text-xl font-semibold leading-none h-5">
|
||||||
variant="ghost"
|
{{ __('Currency & Exchange rate provider') }}
|
||||||
icon-left="chevron-left"
|
</h2>
|
||||||
:label="__('Currency & Exchange rate provider')"
|
<p class="text-p-base text-ink-gray-6">
|
||||||
size="md"
|
{{
|
||||||
@click="() => emit('updateStep', 'general-settings')"
|
__('Configure the currency and exchange rate provider for your CRM')
|
||||||
class="cursor-pointer hover:bg-transparent focus:bg-transparent focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:none active:bg-transparent active:outline-none active:ring-0 active:ring-offset-0 active:text-ink-gray-5 font-semibold text-xl hover:opacity-70 !justify-start"
|
}}
|
||||||
/>
|
</p>
|
||||||
<Badge
|
|
||||||
v-if="settings.isDirty"
|
|
||||||
:label="__('Not Saved')"
|
|
||||||
variant="subtle"
|
|
||||||
theme="orange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex item-center space-x-2 w-3/12 justify-end">
|
<div class="flex item-center space-x-2 w-3/12 justify-end">
|
||||||
<Button
|
<Button
|
||||||
@ -131,17 +125,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ErrorMessage, toast } from 'frappe-ui'
|
import { ErrorMessage, FormControl, toast } from 'frappe-ui'
|
||||||
import { getSettings } from '@/stores/settings'
|
import { getSettings } from '@/stores/settings'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { showSettings } from '@/composables/settings'
|
import { showSettings } from '@/composables/settings'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import FormControl from 'frappe-ui/src/components/FormControl/FormControl.vue'
|
|
||||||
|
|
||||||
const { _settings: settings } = getSettings()
|
const { _settings: settings } = getSettings()
|
||||||
const { $dialog } = globalStore()
|
const { $dialog } = globalStore()
|
||||||
|
|
||||||
const emit = defineEmits(['updateStep'])
|
|
||||||
const errorMessage = ref('')
|
const errorMessage = ref('')
|
||||||
|
|
||||||
function updateSettings() {
|
function updateSettings() {
|
||||||
Loading…
x
Reference in New Issue
Block a user