chore: install prettier

This commit is contained in:
Viet An
2026-05-04 15:22:27 +07:00
parent 93d29ca7d8
commit bd58e2b847
267 changed files with 22950 additions and 13581 deletions

View File

@@ -13,57 +13,47 @@ export const useStore = defineStore("maindev", {
productdocument: undefined,
applicationstatus: undefined,
applicationproduct: undefined,
lastlegendfiltertab: 'Giỏ hàng',
lastlegendfiltertab: "Giỏ hàng",
layersetting: undefined,
country: undefined,
lang: "vi",
branch: {},
rights: [],
product: [],
cart: [],
}),
actions: {
commit(name, data) {
this[name] = data;
},
removeSnackbar() {
this.snackbar = undefined;
},
updateProduct(products) {
this.product = products;
},
updateCart(carts) {
this.cart = carts;
},
updateSingleProduct(updatedProduct) {
const index = this.product.findIndex(p => p.id === updatedProduct.id);
const index = this.product.findIndex((p) => p.id === updatedProduct.id);
if (index !== -1) {
this.product[index] = updatedProduct;
} else {
this.product.push(updatedProduct);
}
},
removeProduct(productId) {
this.product = this.product.filter(p => p.id !== productId);
this.product = this.product.filter((p) => p.id !== productId);
},
},
persist: {
pick: [
"token",
"login",
"lang",
"dealer",
"lastlegendfiltertab",
"layersetting"
],
pick: ["token", "login", "lang", "dealer", "lastlegendfiltertab", "layersetting"],
storage: piniaPluginPersistedstate.localStorage(),
},
});
});