add theme store and input, update some components to use theme

This commit is contained in:
Casey 2025-12-12 14:21:42 -06:00
parent 43c205e577
commit 0c55c9996f
12 changed files with 459 additions and 68 deletions

View file

@ -0,0 +1,27 @@
import { defineStore } from "pinia";
export const useCompanyStore = defineStore("company", {
state: () => ({
companies: ["SprinklersNW", "Nuco Yard Care", "Lowe Fencing", "Veritas Stone", "Daniel's Landscape Supplies"],
selectedCompany: "SprinklersNW",
}),
getters: {
currentCompany: (state) => state.selectedCompany,
},
actions: {
setSelectedCompany(companyName) {
if (this.companies.includes(companyName)) {
this.selectedCompany = companyName;
}
},
setCompanies(companies = []) {
this.companies = [...companies];
if (!this.companies.includes(this.selectedCompany)) {
this.selectedCompany = this.companies[0] || null;
}
},
},
});