u
This commit is contained in:
31
src/db/printer.js
Normal file
31
src/db/printer.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.printer.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function getById(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.printer.getById(googleAuthId, id);
|
||||
}
|
||||
|
||||
export async function create(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.printer.create(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, id, data) {
|
||||
const store = await getStore();
|
||||
return store.printer.update(googleAuthId, id, data);
|
||||
}
|
||||
|
||||
export async function order(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.printer.order(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.printer.delete(googleAuthId, id);
|
||||
}
|
||||
6
src/db/stock.js
Normal file
6
src/db/stock.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function adjust(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.stock.adjust(googleAuthId, data);
|
||||
}
|
||||
@@ -33,6 +33,9 @@ const STORE_NAMESPACES = [
|
||||
'articlesupplier',
|
||||
'manifestattachment',
|
||||
'ledger',
|
||||
'warehouse',
|
||||
'printer',
|
||||
'stock',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
26
src/db/warehouse.js
Normal file
26
src/db/warehouse.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.warehouse.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function getById(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.warehouse.getById(googleAuthId, id);
|
||||
}
|
||||
|
||||
export async function create(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.warehouse.create(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, id, data) {
|
||||
const store = await getStore();
|
||||
return store.warehouse.update(googleAuthId, id, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.warehouse.delete(googleAuthId, id);
|
||||
}
|
||||
Reference in New Issue
Block a user