feat: badge list and form

This commit is contained in:
Jannat Patel
2025-07-07 16:44:48 +05:30
parent 84067cb027
commit 023fd272b1
14 changed files with 753 additions and 185 deletions

View File

@@ -17,7 +17,7 @@
</div>
</div>
<div class="overflow-y-auto">
<SettingFields :fields="fields" :data="data.data" />
<SettingFields :fields="fields" :data="branding.data" />
</div>
<div class="flex flex-row-reverse mt-auto">
<Button variant="solid" :loading="saveSettings.loading" @click="update">
@@ -38,10 +38,6 @@ const props = defineProps({
type: Array,
required: true,
},
data: {
type: Object,
required: true,
},
label: {
type: String,
required: true,
@@ -51,6 +47,12 @@ const props = defineProps({
},
})
const branding = createResource({
url: 'lms.lms.api.get_branding',
auto: true,
cache: 'brand',
})
const saveSettings = createResource({
url: 'frappe.client.set_value',
makeParams(values) {
@@ -86,7 +88,7 @@ const update = () => {
)
}
watch(props.data, (newData) => {
watch(branding, (newData) => {
if (newData && !isDirty.value) {
isDirty.value = true
}