cleanup rules
This commit is contained in:
+4
-2
@@ -1,4 +1,4 @@
|
||||
import {characterRuleBookApi, ledgerApi, ruleBookApi} from "@/mammon";
|
||||
import {characterRuleBookApi, ruleBookApi} from "@/mammon";
|
||||
import {
|
||||
CharacterRuleBookResponse,
|
||||
CreateRuleBookRequest,
|
||||
@@ -13,6 +13,8 @@ import {ref, triggerRef} from "vue";
|
||||
export const activityTypes = {
|
||||
itemBought: {key: "ITEM_BOUGHT", name: "Item Bought"},
|
||||
itemSold: {key: "ITEM_SOLD", name: "Item Sold"},
|
||||
itemAcquiredManually: {key: "ITEM_ACQUIRED_MANUALLY", name: "Item Acquired Manually"},
|
||||
itemConsumedManually: {key: "ITEM_CONSUME_MANUALLY", name: "Item Consumed Manually"},
|
||||
// bountyEarned: {id: "BOUNTY_EARNED", name: "Bounty Earned"},
|
||||
// itemManufactured: {id: "ITEM_MANUFACTURED", name: "Item Manufactured"}
|
||||
} as const;
|
||||
@@ -53,7 +55,7 @@ export const useRuleBooksStore = defineStore('rule-books', () => {
|
||||
|
||||
const findById = (ruleBookId: string): RuleBook | undefined => ruleBooks.value.find(rb => rb.ruleBookId === ruleBookId);
|
||||
const create = (ruleBook: CreateRuleBookRequest) => ruleBookApi.createRuleBook(ruleBook).then(response => addRuleBook(response.data));
|
||||
const update = (ruleBookId: string, ruleBook: CreateRuleBookRequest) => ledgerApi.updateMainLedger(ruleBookId, ruleBook).then(response => replaceRuleBook(response.data));
|
||||
const update = (ruleBookId: string, ruleBook: CreateRuleBookRequest) => ruleBookApi.updateRuleBook(ruleBookId, ruleBook).then(response => replaceRuleBook(response.data));
|
||||
|
||||
const refresh = () => ruleBookApi.findAllRuleBooks().then(response => ruleBooks.value = response.data as RuleBook[]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user