File

lib/examples/src/example-report-preparator/example-report-preparator-question-store.service.ts

Extends

QuestionStore

Index

Properties
Methods

Constructor

constructor()

Methods

Protected addConfig
addConfig(config: ConfigOf<I>)
Inherited from ItemStore
Defined in ItemStore:201
Parameters :
Name Type Optional
config ConfigOf<I> No
Returns : I
Protected addItem
addItem(item: I)
Inherited from ItemStore
Defined in ItemStore:211
Parameters :
Name Type Optional
item I No
Returns : I
Protected addUpdateSubscription
addUpdateSubscription(item: I)
Inherited from ItemStore
Defined in ItemStore:148
Parameters :
Name Type Optional
item I No
Returns : void
Public Async get
get(id: string)
Inherited from ItemStore
Defined in ItemStore:251
Parameters :
Name Type Optional
id string No
Returns : Promise<I | null>
Protected getIdentifyItemFn
getIdentifyItemFn(identifyItemBy: undefined | string | )
Inherited from ItemStore
Defined in ItemStore:167
Parameters :
Name Type Optional
identifyItemBy undefined | string | No
Returns : string
Protected Async init
init(config: ItemStoreConfig<I>)
Inherited from ItemStore
Defined in ItemStore:132
Parameters :
Name Type Optional
config ItemStoreConfig<I> No
Returns : Promise<void>
Protected removeItem
removeItem(item: I)
Inherited from ItemStore
Defined in ItemStore:227
Parameters :
Name Type Optional
item I No
Returns : I
Protected removeUpdateSubscription
removeUpdateSubscription(item: I)
Inherited from ItemStore
Defined in ItemStore:157
Parameters :
Name Type Optional
item I No
Returns : void
Protected Async restoreFromStorage
restoreFromStorage()
Inherited from ItemStore
Defined in ItemStore:193
Returns : Promise<any>
Protected Async storeAll
storeAll()
Inherited from ItemStore
Defined in ItemStore:244
Returns : Promise<void>

Properties

Public Readonly name
Type : string
Default value : "EXAMPLE_REPORT_PREPARATOR.QUESTION_STORE_NAME"
Inherited from ItemStore
Defined in ItemStore:14
Protected _map
Default value : new Map<string,I>()
Inherited from ItemStore
Defined in ItemStore:90
Public addition$
Default value : this.additionSubject.asObservable()
Inherited from ItemStore
Defined in ItemStore:113
Protected additionSubject
Default value : new Subject<I>()
Inherited from ItemStore
Defined in ItemStore:107
Public change$
Default value : merge(this.addition$, this.removal$, this.update$) .pipe( share() )
Inherited from ItemStore
Defined in ItemStore:118
Protected identifyItem
Type : function
Inherited from ItemStore
Defined in ItemStore:104
Public itemClass
Inherited from ItemStore
Defined in ItemStore:101
Public ready
Type : Promise<void>
Inherited from ItemStore
Defined in ItemStore:111
Public removal$
Default value : this.removalSubject.asObservable()
Inherited from ItemStore
Defined in ItemStore:114
Protected removalSubject
Default value : new Subject<I>()
Inherited from ItemStore
Defined in ItemStore:108
Protected storage
Type : ItemStorage<I>
Inherited from ItemStore
Defined in ItemStore:102
Public update$
Default value : this.updateSubject.asObservable()
Inherited from ItemStore
Defined in ItemStore:115
Protected updateSubject
Default value : new Subject<I>()
Inherited from ItemStore
Defined in ItemStore:109
Protected updateSubscriptions
Default value : new Map<string, Subscription>()
Inherited from ItemStore
Defined in ItemStore:97
import  {   Injectable			}	from '@angular/core'

import  { 
			QuestionConfig,
			QuestionStore
		}							from '@rcc/core'




@Injectable()
export class ExampleReportPreparatorQuestionStore extends QuestionStore {

	public readonly name = "EXAMPLE_REPORT_PREPARATOR.QUESTION_STORE_NAME"

	constructor(){
		super(staticStorage)
	}
}

const staticStorage = { getAll: () => Promise.resolve(configs) }

const options		=	[
							{ value:0  , translations: { en: 'terrible', 	de: 'schrecklich' }},
							{ value:1  , translations: { en: 'bad',  		de: 'schlecht' }},
							{ value:2  , translations: { en: 'okay',  		de: 'okay' }},
							{ value:3  , translations: { en: 'splendid',  	de: 'prächtig' }}
						]
const tags			=	['#my-physical-state']


const configs:QuestionConfig[] = [

		{
			id:       'physical-state-000',
			type:     'integer',
			meaning:  'How are your joints?',
			translations: {
				'en': "How are your joints?",
				'de': "Wie geht es Ihren Gelenken?"
			},
			options,
			tags
		},


		{
			id:       'physical-state-001',
			type:     'integer',
			meaning:  'How is your back?',
			translations: {
				'en': "How is your back?",
				'de': "Wie geht es Ihrem Rücken?"
			},
			options,
			tags
		},


		{
			id:       'physical-state-002',
			type:     'integer',
			meaning:  'How is your head?',
			translations: {
				'en': "How is your head?",
				'de': "Wie geht es Ihrem Kopf?"
			},
			options,
			tags
		},


		{
			id:       'example-breakfast',
			type:     'boolean',
			translations: {
				'en': "Did you have breakfast today?",
				'de': "Haben Sie heute schon gefrühstückt?"
			},
			tags
		}


]

results matching ""

    No results matching ""