2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 01:14:03 +00:00

fix: Rename Template Default to Basic

This commit is contained in:
Faris Ansari 2020-02-06 12:47:55 +05:30
parent ec643ca374
commit bb16c5ab56
4 changed files with 16 additions and 11 deletions

View File

@ -59,8 +59,8 @@ module.exports = {
fieldname: 'template', fieldname: 'template',
label: 'Template', label: 'Template',
fieldtype: 'Select', fieldtype: 'Select',
options: ['Default', 'Minimal', 'Business'], options: ['Basic', 'Minimal', 'Business'],
default: 'Default' default: 'Basic'
}, },
{ {
fieldname: 'color', fieldname: 'color',

View File

@ -3,7 +3,7 @@
</template> </template>
<script> <script>
import Default from './Templates/Default'; import Basic from './Templates/Basic';
import Minimal from './Templates/Minimal'; import Minimal from './Templates/Minimal';
import Business from './Templates/Business'; import Business from './Templates/Business';
@ -12,12 +12,16 @@ export default {
props: ['doc', 'printSettings'], props: ['doc', 'printSettings'],
computed: { computed: {
printComponent() { printComponent() {
let type = this.printSettings.template || 'Default'; let type = this.printSettings.template;
return { let templates = {
Default, Basic,
Minimal, Minimal,
Business Business
}[type]; };
if (!(type in templates)) {
type = 'Basic';
}
return templates[type];
} }
} }
}; };

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="border"> <div class="border h-full">
<div> <div>
<div class="px-6 pt-6" v-if="printSettings && accountingSettings"> <div class="px-6 pt-6" v-if="printSettings && accountingSettings">
<div class="flex text-sm text-gray-900 border-b pb-4"> <div class="flex text-sm text-gray-900 border-b pb-4">
@ -165,5 +165,3 @@ export default {
} }
}; };
</script> </script>
<style></style>

View File

@ -1,5 +1,8 @@
<template> <template>
<div class="bg-white border" :style="{ 'font-family': printSettings.font }"> <div
class="bg-white border h-full"
:style="{ 'font-family': printSettings.font }"
>
<div class="flex items-center justify-between px-12 py-10 border-b"> <div class="flex items-center justify-between px-12 py-10 border-b">
<div class="flex items-center"> <div class="flex items-center">
<div class="flex items-center rounded h-16"> <div class="flex items-center rounded h-16">