Skip to content

destillationapp-frontend v0.1.0


destillationapp-frontend / store/settings/actions / default

Variable: default

default: object

Defined in: store/settings/actions.ts:38

Type declaration

addDistiller()

addDistiller(context, distiller): Promise<string | void>

Adds a distiller to the distillerList.

Parameters

context

Context

The Vuex context.

distiller

Distiller

The distiller object to add.

Returns

Promise<string | void>

deleteDistillerById()

deleteDistillerById(context, id): Promise<string | void>

Deletes a distiller from the distillerList by its ID.

Parameters

context

Context

The Vuex context.

id

string

The ID of the distiller to delete.

Returns

Promise<string | void>

fetchLocalStorageData()

fetchLocalStorageData(context, payload): void

Fetches data from local storage and commits it to the state.

Parameters

context

Context

The Vuex context.

payload

The payload containing the key.

key

keyof SettingsForm

Returns

void

fetchSettings()

fetchSettings(context): Promise<string | void>

Fetches user settings from the database.

Parameters

context

Context

The Vuex context.

Returns

Promise<string | void>

setInitialSettings()

setInitialSettings(context, userId): Promise<void>

Creates initial settings in the database.

Parameters

context

Context

The Vuex context.

userId

string

The user ID for which to create settings.

Returns

Promise<void>

setValue()

setValue(context, payload): void

Sets a value in the state.

Parameters

context

Context

The Vuex context.

payload

The payload containing the input and value.

input

string

value

string | number | boolean | any[]

Returns

void