mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-29 00:41:08 -04:00
Import data.
This commit is contained in:
@ -7,9 +7,11 @@ export default {
|
||||
mutations: {},
|
||||
actions: {
|
||||
async init({ dispatch }) {
|
||||
dispatch('clients/terminate', null, { root: true });
|
||||
dispatch('bankAccounts/terminate', null, { root: true });
|
||||
dispatch('invoices/terminate', null, { root: true });
|
||||
await Promise.all([
|
||||
dispatch('clients/terminate', null, { root: true }),
|
||||
dispatch('bankAccounts/terminate', null, { root: true }),
|
||||
dispatch('invoices/terminate', null, { root: true }),
|
||||
]);
|
||||
|
||||
await dispatch('getTeam');
|
||||
|
||||
@ -17,6 +19,9 @@ export default {
|
||||
dispatch('bankAccounts/init', null, { root: true });
|
||||
dispatch('invoices/init', null, { root: true });
|
||||
},
|
||||
async terminate() {
|
||||
return Team.deleteAll();
|
||||
},
|
||||
async getTeam() {
|
||||
const team = await TeamService.getTeam();
|
||||
await Team.create({ data: team });
|
||||
|
||||
Reference in New Issue
Block a user