2019-10-26 14:46:04 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2022-01-18 08:31:51 +00:00
|
|
|
<TwoColumnForm
|
|
|
|
v-if="doc"
|
|
|
|
:doc="doc"
|
|
|
|
:fields="fields"
|
|
|
|
:autosave="true"
|
|
|
|
:emit-change="true"
|
|
|
|
@change="forwardChangeEvent"
|
|
|
|
/>
|
2022-02-03 07:25:54 +00:00
|
|
|
<div class="flex flex-row justify-end my-4">
|
|
|
|
<button
|
|
|
|
class="text-gray-900 text-sm hover:bg-gray-100 rounded-md px-4 py-1.5"
|
2022-02-03 10:03:21 +00:00
|
|
|
@click="checkForUpdates(true)"
|
2022-02-03 07:25:54 +00:00
|
|
|
>
|
|
|
|
Check for Updates
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-10-26 14:46:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-01-20 20:57:29 +00:00
|
|
|
import frappe from 'frappe';
|
2019-10-26 14:46:04 +00:00
|
|
|
import TwoColumnForm from '@/components/TwoColumnForm';
|
2022-02-03 07:25:54 +00:00
|
|
|
import { checkForUpdates } from '@/utils';
|
2019-10-26 14:46:04 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'TabSystem',
|
|
|
|
components: {
|
|
|
|
TwoColumnForm,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-11-24 09:08:13 +00:00
|
|
|
doc: null,
|
2019-10-26 14:46:04 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
async mounted() {
|
2019-12-16 13:52:14 +00:00
|
|
|
this.doc = frappe.SystemSettings;
|
|
|
|
this.companyName = frappe.AccountingSettings.companyName;
|
2019-10-26 14:46:04 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
fields() {
|
|
|
|
let meta = frappe.getMeta('SystemSettings');
|
|
|
|
return meta.getQuickEditFields();
|
|
|
|
},
|
2021-11-24 09:08:13 +00:00
|
|
|
},
|
2022-01-18 08:31:51 +00:00
|
|
|
methods: {
|
2022-02-03 10:03:21 +00:00
|
|
|
checkForUpdates,
|
2022-01-18 08:31:51 +00:00
|
|
|
forwardChangeEvent(...args) {
|
|
|
|
this.$emit('change', ...args);
|
|
|
|
},
|
|
|
|
},
|
2019-10-26 14:46:04 +00:00
|
|
|
};
|
|
|
|
</script>
|