1111 * or submit itself to any jurisdiction.
1212 */
1313import { LogCreationModel } from './LogCreationModel.js' ;
14- import { OnCallLogTemplate } from './OnCallLogTemplate.js' ;
15-
16- /**
17- * @typedef OnCallLogTemplateFormData
18- * @property {string } shortDescription
19- * @property {string } detectorOrSubsystem
20- * @property {string } severity
21- * @property {string } scope
22- * @property {string } shifterName
23- * @property {string } shifterPosition
24- * @property {string } lhcBeamMode
25- * @property {string } issueDescription
26- * @property {string } reason
27- * @property {string } alreadyTakenActions
28- */
14+ import { OnCallLogTemplate } from './templates/OnCallLogTemplate.js' ;
15+ import { RcDailyMeetingTemplate } from './templates/RcDailyMeetingTemplate.js' ;
2916
3017// Only one template for now
3118/**
32- * @typedef {OnCallLogTemplate } LogTemplate
19+ * @typedef {OnCallLogTemplate|RcDailyMeetingTemplate } LogTemplate
3320 */
3421
3522/**
36- * @typedef {'on-call' } logTemplateKey
23+ * @typedef {'on-call'|'rc-daily-meeting' } logTemplateKey
3724 */
3825
3926/**
@@ -43,7 +30,10 @@ import { OnCallLogTemplate } from './OnCallLogTemplate.js';
4330 * @return {LogTemplate|null } the new log template
4431 */
4532const logTemplatesFactory = ( key ) => {
46- const templateClass = { [ 'on-call' ] : OnCallLogTemplate } [ key ] ?? null ;
33+ const templateClass = {
34+ [ 'on-call' ] : OnCallLogTemplate ,
35+ [ 'rc-daily-meeting' ] : RcDailyMeetingTemplate ,
36+ } [ key ] ?? null ;
4737 if ( templateClass ) {
4838 return new templateClass ( ) ;
4939 }
@@ -116,7 +106,7 @@ export class TemplatedLogCreationModel extends LogCreationModel {
116106 /**
117107 * Set the current template key
118108 *
119- * @return {logTemplateKey } the current key
109+ * @return {logTemplateKey|null } the current key
120110 */
121111 get templateKey ( ) {
122112 return this . _templateKey ;
0 commit comments