diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index a363669..2136ff4 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -23,20 +23,20 @@ import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; -export interface CombiningLedgerResponse extends LedgerResponse { +export interface CombinedLedgerResponse extends LedgerResponse { 'ledgerId': string; 'name': string; 'memberLedgerIds': Array; - 'type'?: CombiningLedgerResponseTypeEnum; + 'type'?: CombinedLedgerResponseTypeEnum; } -export const CombiningLedgerResponseTypeEnum = { - Combining: 'COMBINING', +export const CombinedLedgerResponseTypeEnum = { + Combined: 'COMBINED', } as const; -export type CombiningLedgerResponseTypeEnum = typeof CombiningLedgerResponseTypeEnum[keyof typeof CombiningLedgerResponseTypeEnum]; +export type CombinedLedgerResponseTypeEnum = typeof CombinedLedgerResponseTypeEnum[keyof typeof CombinedLedgerResponseTypeEnum]; -export interface CreateCombiningLedgerRequest { +export interface CreateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; } @@ -46,7 +46,7 @@ export interface CreateMainLedgerRequest { /** * @type FindAll200ResponseInner */ -export type FindAll200ResponseInner = CombiningLedgerResponse | MainLedgerResponse; +export type FindAll200ResponseInner = CombinedLedgerResponse | MainLedgerResponse; export interface LedgerResponse { 'type'?: LedgerResponseTypeEnum; @@ -54,7 +54,7 @@ export interface LedgerResponse { export const LedgerResponseTypeEnum = { Main: 'MAIN', - Combining: 'COMBINING', + Combined: 'COMBINED', } as const; export type LedgerResponseTypeEnum = typeof LedgerResponseTypeEnum[keyof typeof LedgerResponseTypeEnum]; @@ -71,7 +71,7 @@ export const MainLedgerResponseTypeEnum = { export type MainLedgerResponseTypeEnum = typeof MainLedgerResponseTypeEnum[keyof typeof MainLedgerResponseTypeEnum]; -export interface UpdateCombiningLedgerRequest { +export interface UpdateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; } @@ -86,14 +86,14 @@ export const LedgerControllerApiAxiosParamCreator = function (configuration?: Co return { /** * - * @param {CreateCombiningLedgerRequest} createCombiningLedgerRequest + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createCombiningLedger: async (createCombiningLedgerRequest: CreateCombiningLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'createCombiningLedgerRequest' is not null or undefined - assertParamExists('createCombiningLedger', 'createCombiningLedgerRequest', createCombiningLedgerRequest) - const localVarPath = `/ledgers/combining`; + createCombinedLedger: async (createCombinedLedgerRequest: CreateCombinedLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createCombinedLedgerRequest' is not null or undefined + assertParamExists('createCombinedLedger', 'createCombinedLedgerRequest', createCombinedLedgerRequest) + const localVarPath = `/ledgers/combined`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -111,7 +111,7 @@ export const LedgerControllerApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createCombiningLedgerRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createCombinedLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -217,16 +217,16 @@ export const LedgerControllerApiAxiosParamCreator = function (configuration?: Co /** * * @param {string} ledgerId - * @param {UpdateCombiningLedgerRequest} updateCombiningLedgerRequest + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateCombiningLedger: async (ledgerId: string, updateCombiningLedgerRequest: UpdateCombiningLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { + updateCombinedLedger: async (ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined - assertParamExists('updateCombiningLedger', 'ledgerId', ledgerId) - // verify required parameter 'updateCombiningLedgerRequest' is not null or undefined - assertParamExists('updateCombiningLedger', 'updateCombiningLedgerRequest', updateCombiningLedgerRequest) - const localVarPath = `/ledgers/combining/{ledgerId}` + assertParamExists('updateCombinedLedger', 'ledgerId', ledgerId) + // verify required parameter 'updateCombinedLedgerRequest' is not null or undefined + assertParamExists('updateCombinedLedger', 'updateCombinedLedgerRequest', updateCombinedLedgerRequest) + const localVarPath = `/ledgers/combined/{ledgerId}` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -245,7 +245,7 @@ export const LedgerControllerApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateCombiningLedgerRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(updateCombinedLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -301,14 +301,14 @@ export const LedgerControllerApiFp = function(configuration?: Configuration) { return { /** * - * @param {CreateCombiningLedgerRequest} createCombiningLedgerRequest + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createCombiningLedger(createCombiningLedgerRequest: CreateCombiningLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createCombiningLedger(createCombiningLedgerRequest, options); + async createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCombinedLedger(createCombinedLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LedgerControllerApi.createCombiningLedger']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['LedgerControllerApi.createCombinedLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -349,14 +349,14 @@ export const LedgerControllerApiFp = function(configuration?: Configuration) { /** * * @param {string} ledgerId - * @param {UpdateCombiningLedgerRequest} updateCombiningLedgerRequest + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateCombiningLedger(ledgerId: string, updateCombiningLedgerRequest: UpdateCombiningLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateCombiningLedger(ledgerId, updateCombiningLedgerRequest, options); + async updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LedgerControllerApi.updateCombiningLedger']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['LedgerControllerApi.updateCombinedLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -383,12 +383,12 @@ export const LedgerControllerApiFactory = function (configuration?: Configuratio return { /** * - * @param {CreateCombiningLedgerRequest} createCombiningLedgerRequest + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createCombiningLedger(createCombiningLedgerRequest: CreateCombiningLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createCombiningLedger(createCombiningLedgerRequest, options).then((request) => request(axios, basePath)); + createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createCombinedLedger(createCombinedLedgerRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -419,12 +419,12 @@ export const LedgerControllerApiFactory = function (configuration?: Configuratio /** * * @param {string} ledgerId - * @param {UpdateCombiningLedgerRequest} updateCombiningLedgerRequest + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateCombiningLedger(ledgerId: string, updateCombiningLedgerRequest: UpdateCombiningLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateCombiningLedger(ledgerId, updateCombiningLedgerRequest, options).then((request) => request(axios, basePath)); + updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -445,12 +445,12 @@ export const LedgerControllerApiFactory = function (configuration?: Configuratio export class LedgerControllerApi extends BaseAPI { /** * - * @param {CreateCombiningLedgerRequest} createCombiningLedgerRequest + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public createCombiningLedger(createCombiningLedgerRequest: CreateCombiningLedgerRequest, options?: RawAxiosRequestConfig) { - return LedgerControllerApiFp(this.configuration).createCombiningLedger(createCombiningLedgerRequest, options).then((request) => request(this.axios, this.basePath)); + public createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig) { + return LedgerControllerApiFp(this.configuration).createCombinedLedger(createCombinedLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } /** @@ -485,12 +485,12 @@ export class LedgerControllerApi extends BaseAPI { /** * * @param {string} ledgerId - * @param {UpdateCombiningLedgerRequest} updateCombiningLedgerRequest + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public updateCombiningLedger(ledgerId: string, updateCombiningLedgerRequest: UpdateCombiningLedgerRequest, options?: RawAxiosRequestConfig) { - return LedgerControllerApiFp(this.configuration).updateCombiningLedger(ledgerId, updateCombiningLedgerRequest, options).then((request) => request(this.axios, this.basePath)); + public updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig) { + return LedgerControllerApiFp(this.configuration).updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/ledger/CreateLedgerModal.vue b/src/ledger/CreateLedgerModal.vue index 80e58d1..b8b91dd 100644 --- a/src/ledger/CreateLedgerModal.vue +++ b/src/ledger/CreateLedgerModal.vue @@ -2,7 +2,7 @@ import {computed, ref} from "vue"; import {storeToRefs} from "pinia"; -import {isCombining, Ledger, LedgerType, LedgerTypes, useLedgersStore} from "./ledger"; +import {isCombined, Ledger, LedgerType, LedgerTypes, useLedgersStore} from "./ledger"; import {Modal} from "@/components"; import LedgerLabel from "./LedgerLabel.vue"; import {PlusIcon, TrashIcon} from '@heroicons/vue/24/outline'; @@ -15,7 +15,7 @@ const props = defineProps(); const ledgersStore = useLedgersStore(); const {ledgers} = storeToRefs(ledgersStore); -const {findById, findAllById, createMain, createCombining, updateMain, updateCombining} = ledgersStore; +const {findById, findAllById, createMain, createCombined, updateMain, updateCombined} = ledgersStore; const modalOpen = ref(false); @@ -39,7 +39,7 @@ const open = () => { if (ledger) { type.value = ledger.type; name.value = ledger.name; - members.value = isCombining(ledger) ? findAllById(ledger.memberLedgerIds) : []; + members.value = isCombined(ledger) ? findAllById(ledger.memberLedgerIds) : []; } else { type.value = LedgerTypes.Main; name.value = ""; @@ -52,7 +52,7 @@ const canSave = computed(() => name.value.trim().length > 0); const isCreating = computed(() => props.ledgerId) const title = computed(() => { if (isCreating.value) { - return `Creating ${type.value === LedgerTypes.Main ? 'Main' : 'Combining'} Ledger` + return `Creating ${type.value === LedgerTypes.Main ? 'Main' : 'Combined'} Ledger` } return `Updating ${name.value}` }) @@ -61,7 +61,7 @@ const create = () => { if (type.value === LedgerTypes.Main) { createMain({name: name.value}) } else { - createCombining({name: name.value, memberLedgerIds: members.value.map(l => l.ledgerId)}) + createCombined({name: name.value, memberLedgerIds: members.value.map(l => l.ledgerId)}) } } @@ -69,7 +69,7 @@ const update = () => { if (type.value === LedgerTypes.Main) { updateMain(props.ledgerId, {name: name.value}) } else { - updateCombining(props.ledgerId, {name: name.value, memberLedgerIds: members.value.map(l => l.ledgerId)}) + updateCombined(props.ledgerId, {name: name.value, memberLedgerIds: members.value.map(l => l.ledgerId)}) } } @@ -100,7 +100,7 @@ defineExpose({ open });
- +
@@ -110,7 +110,7 @@ defineExpose({ open });
-
+
Member Ledgers:
diff --git a/src/ledger/LedgerLabel.vue b/src/ledger/LedgerLabel.vue index 01c1683..23bd9ae 100644 --- a/src/ledger/LedgerLabel.vue +++ b/src/ledger/LedgerLabel.vue @@ -1,6 +1,6 @@