LogoPixi’VN
indexClasses

Class: ActivityStoredClass<OnRunEventType>

Defined in: src/classes/activity/ActivityStoredClass.ts:13

Extends

  • StoredClassModel

Extended by

Type Parameters

OnRunEventType

OnRunEventType = ActivityInterface

Implements

  • ActivityBaseInternalInterface

Constructors

Constructor

> new ActivityStoredClass<OnRunEventType>(id, _onRun, props, category?): ActivityStoredClass<OnRunEventType>

Defined in: src/classes/activity/ActivityStoredClass.ts:17

Parameters

id

string

_onRun

OnRunEvent<OnRunEventType>

props

ActivityStoredClassProps

category?

string = ACTIVITY_CATEGORY

Returns

ActivityStoredClass<OnRunEventType>

Overrides

StoredClassModel.constructor

Properties

_onRun

> protected readonly _onRun: OnRunEvent<OnRunEventType>

Defined in: src/classes/activity/ActivityStoredClass.ts:19


id

> readonly id: string

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:41

Is id of the stored class. is unique for this class.

Implementation of

ActivityBaseInternalInterface.id

Inherited from

StoredClassModel.id

Accessors

dateScheduling

Get Signature

> get dateScheduling(): DateSchedulingInterface | undefined

Defined in: src/classes/activity/ActivityStoredClass.ts:34

Used to schedule what date it will be added and removed.

Returns

DateSchedulingInterface | undefined

Implementation of

ActivityBaseInternalInterface.dateScheduling


expired

Get Signature

> get expired(): boolean

Defined in: src/classes/activity/ActivityStoredClass.ts:48

Whether the activity/commitment is a deadline, so it will then be removed or hidden.

It depends only on the date, not the time. So if you set { dateScheduling: { from: 0, to: 3 }, timeSlot { from: 10, to: 20 } } the activity/commitment hidden or deleted on date 3 at 0.

Returns

boolean

Implementation of

ActivityBaseInternalInterface.expired


run

Get Signature

> get run(): OnRunAsyncFunction

Defined in: src/classes/activity/ActivityStoredClass.ts:41

The function that is called when the activity/commitment is runned.

Returns

OnRunAsyncFunction

Implementation of

ActivityBaseInternalInterface.run


timeSlot

Get Signature

> get timeSlot(): TimeSchedulingInterface | TimeSchedulingInterface[] | undefined

Defined in: src/classes/activity/ActivityStoredClass.ts:29

Time slot in which activity/commitment will be active.

Returns

TimeSchedulingInterface | TimeSchedulingInterface[] | undefined

Implementation of

ActivityBaseInternalInterface.timeSlot

Methods

addTempHistoryItem()

> protected addTempHistoryItem(): void

Defined in: src/classes/activity/ActivityStoredClass.ts:38

Returns

void


getStorageProperty()

> protected getStorageProperty<T>(propertyName, idToUse?): T | undefined

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:56

Get a property from the storage.

Type Parameters

T

T = StorageElementType

Parameters

propertyName

string

The name of the property to get.

idToUse?

string

The id of the instance to get the property.

Returns

T | undefined

The value of the property. If the property is not found, returns undefined.

Default

this.id

Inherited from

StoredClassModel.getStorageProperty


isActive()

> isActive(options?): boolean

Defined in: src/classes/activity/ActivityStoredClass.ts:55

Whether the activity/commitment is active, so it will be shown in the routine and can be runned.

Parameters

options?

ActiveScheduling = {}

The options to check if the activity/commitment is active.

Returns

boolean

Implementation of

ActivityBaseInternalInterface.isActive


migrateOldStorage()

> protected migrateOldStorage(oldCategoryId?): void

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:37

Parameters

oldCategoryId?

string

Returns

void

Inherited from

StoredClassModel.migrateOldStorage


setStorageProperty()

> protected setStorageProperty<T>(propertyName, value): void

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:49

Update a property in the storage.

Type Parameters

T

T

The type of the value to set. (Deprecated, it is not necessary to specify the type of the value, it will be inferred from the value)

Parameters

propertyName

string

The name of the property to set.

value

StorageElementType

The value to set. If is undefined, the property will be removed from the storage.

Returns

void

Inherited from

StoredClassModel.setStorageProperty

On this page