PageSourceSearch

https://r0medicina.web.app/chunk-tvDGUdIQ.js

js r0medicina.web.app collected 2026-10-03 12:36:24 UTC 10,806 bytes, 1 lines download raw bytes

1import{l as N}from"./chunk-CtROqRrB.js";import{$n as nb,D as Fi,Ft as WD,Jn as mh,Mr as tg,Nt as Vh,Rt as XD,Tt as UD,Ut as Xu,V as Ju,Wt as YD,Yt as _E,_r as qy,ar as oi,bn as fb,c as Ah,cr as ph,ct as QD,fr as pw,jn as hb,jt as Uw,kr as sw,m as C,pn as dI,sr as pI,xn as fl,yn as ew,zt as XI}from"./chunk-mbnDHcR5.js";import"./chunk-Cx_FOi17.js";import"./chunk-BL5u0M8g.js";import"./chunk-BJZfQ5wl.js";import"./chunk-DsS0xw2Q.js";import"./chunk-CABSGZFi.js";import"./chunk-ZCYHFKe9.js";import"./chunk-B3vwwUV5.js";import{C as Mf,H as Wb,L as Ub,V as Vf,Y as af,_t as rf,c as Ag,dt as mx,ft as nx,l as Ay,lt as mf,rt as gf,w as My,xt as uf}from"./main-VV467TBP.js";import"./chunk-yqX7SA_I.js";import{t as Se}from"./chunk-BACQIQDA.js";import{t as G}from"./chunk-C_1mrMO7.js";import"./chunk-BRW_r8sf.js";import{t as o}from"./chunk-1nhDWG64.js";var Z=()=>[Ay,Ag,mf,gf,nx,Vf,mx,import(`./chunk-BnxM6yQV.js`).then(n=>n.RichEditorComponent),import(`./chunk-f2C6clSw.js`).then(n=>n.FormInputComponent),Wb,rf,Mf,uf,import(`./chunk-Nij07E38.js`).then(n=>n.TranslatePipe)];var ee=()=>[];var te=(n,g)=>g.id;function ie(n,g){if(n&1&&(Fi(0,`ion-select-option`,7),Uw(1),fl()),n&2){let e=g.$implicit;Ah(`value`,e.id),_E(),tg(e.name)}
1}function ne(n,g){if(n&1){let e=sw();Fi(0,`ion-grid`)(1,`ion-row`)(2,`ion-col`)(3,`app-form-input`,10),Vh(`valueChange`,function(a){Ju(e);let d=pw(5);return Xu(d.onPracticeRequestsStartDateChange(a))}),fl()(),Fi(4,`ion-col`)(5,`app-form-input`,11),Vh(`valueChange`,function(a){Ju(e);let d=pw(5);return Xu(d.onPracticeRequestsEndDateChange(a))}),fl()()()()}if(n&2){let e=pw(5);_E(3),Ah(`readonly`,e.readonly())(`value`,e.model().config.practiceRequestsStartDate),_E(2),Ah(`readonly`,e.readonly())(`value`,e.model().config.practiceRequestsEndDate)}}function ae(n,g){if(n&1){let e=sw();Fi(0,`ion-item`)(1,`ion-select`,6),fb(2,`translate`),dI(),Vh(`ngModelChange`,function(a){Ju(e);let d=pw(4);return Xu(d.onStudentRequestTypeChange(a))}),Fi(3,`ion-select-option`,7),Uw(4),fb(5,`translate`),fl(),Fi(6,`ion-select-option`,7),Uw(7),fb(8,`translate`),fl(),Fi(9,`ion-select-option`,7),Uw(10),fb(11,`translate`),fl(),Fi(12,`ion-select-option`,7),Uw(13),fb(14,`translate`),fl(),Fi(15,`ion-select-option`,7),Uw(16),fb(17,`translate`),fl(),Fi(18,`ion-select-option`,7),Uw(19),fb(20,`translate`),fl()()(),Fi(21,`ion-item`)(22,`ion-select`,8),fb(23,`translate`),dI(),Vh(`ngModelChange`,function(a){Ju(e);let d=pw(4);return Xu(d.onPracticeRequestSubjectsChange(a))}),XD(24,ie,2,2,`ion-select-option`,7,te),fl()(),Fi(26,`ion-item`)(27,`ion-toggle`,9),dI(),Vh(`ionChange`,function(){Ju(e);let a=pw(4);return Xu(a.changeEstablishDates())})(`ngModelChange`,function(a){Ju(e);let d=pw(4);return Xu(d.establishRequestDates.set(a))}),Uw(28),fb(29,`translate`),fl()(),QD(30,ne,6,4,`ion-grid`)}if(n&2){let e=pw(4);_E(),Ah(`ngModel`,e.model().config.studentRequestType)(`label`,hb(2,20,`PRACTICE_REQUEST.TYPE`))(`helperText`,e.getRequestTypeHelperText()),pI(),_E(2),Ah(`value`,0),_E(),tg(hb(5,22,`PRACTICE_REQUEST.BY_SUBJECT`)),_E(2),Ah(`value`,1),_E(),tg(hb(8,24,`PRACTICE_REQUEST.BY_SPECIALTY`)),_E(2),Ah(`value`,3),_E(),tg(hb(11,26,`PRACTICE_REQUEST.BY_SUBJECT_ONLY_SPECIALTIES`)),_E(2),Ah(`value`,4),_E(),tg(hb(14,28,`PRACTICE_REQUEST.BY_SUBJECT_ONLY_CENTERS`)),_E(2),Ah(`value`,5),_E(),tg(hb(17,30,`PRACTICE_REQUEST.BY_SPECIALTY_ONLY_SPECIALTIES`)),_E(2),Ah(`value`,6),_E(),tg(hb(20,32,`PRACTICE_REQUEST.BY_SPECIALTY_ONLY_CENTERS`)),_E(3),Ah(`ngModel`,e.model().config.practiceRequestSubjects)(`label`,hb(23,34,`PRACTICE_REQUEST.ALLOWED_SUBJECTS`)),pI(),_E(2),ew(e.subjects()),_E(3),Ah(`ngModel`,e.establishRequestDates()),pI(),_E(),tg(hb(29,36,`PRACTICE_REQUEST.ESTABLISH_DATES`)),_E(2),YD(e.establishRequestDates()?30:-1)}}function oe(n,g){if(n&1){let e=sw();Fi(0,`ion-item`)(1,`ion-select`,6),fb(2,`translate`),dI(),Vh(`ngModelChange`,function(a){Ju(e);let d=pw(3);return Xu(d.setModelValue(`phase`,a))}),Fi(3,`ion-select-option`,7),Uw(4),fb(5,`translate`),fl(),Fi(6,`ion-select-option`,7),Uw(7),fb(8,`translate`),fl(),Fi(9,`ion-select-option`,7),Uw(10),fb(11,`translate`),fl(),Fi(12,`ion-select-option`,7),Uw(13),fb(14,`translate`),fl()()(),QD(15,ae,31,38)}if(n&2){let e=pw(3);_E(),Ah(`ngModel`,e.model().phase)(`label`,hb(2,12,`PRACTICE_REQUEST.STATUS`))(`helperText`,e.getRequestStatusHelperText()),pI(),_E(2),Ah(`value`,0),_E(),tg(hb(5,14,`PRACTICE_REQUEST.DISABLED_STATUS`)),_E(2),Ah(`value`,1),_E(),tg(hb(8,16,`PRACTICE_REQUEST.ENABLED_STATUS`)),_E(2),Ah(`value`,2),_E(),tg(hb(11,18,`PRACTICE_REQUEST.ASSIGNING_STATUS`)),_E(2),Ah(`value`,3),_E(),tg(hb(14,20,`PRACTICE_REQUEST.ASSIGNED_STATUS`)),_E(2),YD(e.model().phase!==0?15:-1)}}function re(n,g){if(n&1){let e=sw();Fi(0,`ion-item`)(1,`ion-toggle`,4),dI(),Vh(`ngModelChange`,function(a){Ju(e);let d=pw(2);
1return Xu(d.onAllowPracticeRequestsChange(a))}),Uw(2),fb(3,`translate`),fl()(),QD(4,oe,16,22),Fi(5,`app-rich-editor`,5),Vh(`valueChange`,function(a){Ju(e);let d=pw(2);return Xu(d.onStudentRequestMessageChange(a))}),fl()}if(n&2){let e=pw(2);_E(),Ah(`ngModel`,e.model().config.allowPracticeRequests),pI(),_E(),tg(hb(3,4,`PRACTICE_REQUEST.ALLOW`)),_E(2),YD(e.model().config.allowPracticeRequests?4:-1),_E(),Ah(`value`,e.model().config.studentRequestMessage)}}function se(n,g){n&1&&(Fi(0,`ion-item`)(1,`ion-label`,12),Uw(2),fb(3,`translate`),fl()()),n&2&&(_E(2),tg(hb(3,1,`PRACTICE_REQUEST.COURSE_ARCHIVED`)))}function le(n,g){if(n&1&&(Fi(0,`ion-list`,3),QD(1,re,6,6)(2,se,4,3,`ion-item`),fl()),n&2){let e=pw();Ah(`inset`,!0),_E(),YD(e.model().phase!==5?1:2)}}var he=(()=>{class n extends G{constructor(){super(...arguments),this.subjectService=C(o),this.permissionsTarget=`course`,this.headerButtons=[{id:`update`,label:`Save`}],this.establishRequestDates=oi(!1),this.subjects=oi([])}finishedGettingEntityAndCourse(){super.finishedGettingEntityAndCourse();let e=this.course(),t=this.entityId();!e?.id||!t||(this.courseService.getEntry(e.id,t).then(a=>{this.model.set(this.clone(a)),this.establishRequestDates.set(!!this.model().config.practiceRequestsStartDate&&!!this.model().config.practiceRequestsEndDate)}),this.subjectService.index(t,e.id).then(a=>this.subjects.set(a)))}modelTitle(){return`Practice requests`}addModel(){return N(this,null,function*(){let e=this.model(),t=this.entityId();if(!t)return;let a=yield this.courseService.addEntry(e,t);this.setModelValue(`id`,a.id)})}updateModel(){return N(this,null,function*(){let e=this.model(),t=this.entityId();t&&(yield this.courseService.updateEntry(e,t),this.courseService.setCurrentCourse(e))})}saveSettings(){return N(this,null,function*(){let e=this.entityId();if(!e)return;let t=this.clone(this.model());(!this.establishRequestDates()||!t.config.allowPracticeRequests)&&(delete t.config.practiceRequestsStartDate,delete t.config.practiceRequestsEndDate),t.config.allowPracticeRequests||(delete t.config.practiceRequestSubjects,t.phase=0),yield this.courseService.updateEntry(t,e),this.model.set(t),this.courseService.setCurrentCourse(t),yield(yield this.alertController.create({header:this.translateService.instant(`Saved`),message:this.translateService.instant(`The course settings have been saved.`),buttons:[{text:this.translateService.instant(`Continue`),role:`cancel`}]})).present()})}buttonClicked(e){return N(this,null,function*(){e===`update`&&(yield this.saveSettings())})}getRequestStatusHelperText(){switch(Number.parseInt(this.model()?.phase.toString()??``)){case 0:return this.translateService.instant(`PRACTICE_REQUEST.DISABLED_HELP`);case 1:return this.translateService.instant(`PRACTICE_REQUEST.ENABLED_HELP`);case 2:return this.translateService.instant(`PRACTICE_REQUEST.ASSIGNING_HELP`);case 3:return this.translateService.instant(`PRACTICE_REQUEST.ASSIGNED_HELP`);default:return``}}getRequestTypeHelperText(){switch(Number.parseInt(this.model()?.config?.studentRequestType.toString()??``)){case 3:return this.translateService.instant(`PRACTICE_REQUEST.BY_SUBJECT_ONLY_SPECIALTIES_HELP`);case 4:return this.translateService.instant(`PRACTICE_REQUEST.BY_SUBJECT_ONLY_CENTERS_HELP`);case 5:return this.translateService.instant(`PRACTICE_REQUEST.BY_SPECIALTY_ONLY_SPECIALTIES_HELP`);case 6:return this.translateService.instant(`PRACTICE_REQUEST.BY_SPECIALTY_ONLY_CENTERS_HELP`);case 0:return this.translateService.instant(`PRACTICE_REQUEST.BY_SUBJECT_HELP`);case 1:return this.translateService.instant(`PRACTICE_REQUEST.BY_SPECIALTY_HELP`);default:return``}}changeEstablishDates(){this.updateModelState(e=>{e.config.practiceRequestsStartDate||(e.config.practiceRequestsStartDate=Date.now()),e.config.practiceRequestsEndDate||(e.config.practiceRequestsEndDate=e.config.practiceRequestsStartDate+864e5)})}
1onAllowPracticeRequestsChange(e){this.updateModelState(t=>{t.config.allowPracticeRequests=e})}onStudentRequestTypeChange(e){this.updateModelState(t=>{t.config.studentRequestType=e})}onPracticeRequestSubjectsChange(e){this.updateModelState(t=>{t.config.practiceRequestSubjects=e})}onPracticeRequestsStartDateChange(e){this.updateModelState(t=>{t.config.practiceRequestsStartDate=e})}onPracticeRequestsEndDateChange(e){this.updateModelState(t=>{t.config.practiceRequestsEndDate=e})}onStudentRequestMessageChange(e){this.updateModelState(t=>{t.config.studentRequestMessage=e})}static{this.ɵfac=(()=>{let e;return function(a){return(e||(e=qy(n)))(a||n)}})()}static{this.ɵcmp=XI({type:n,selectors:[[`app-practice-requests`]],features:[ph],decls:6,vars:6,consts:[[3,`translucent`],[`defaultRoot`,`/settings`,`label`,`Practice requests`,3,`buttonClick`,`canGoBack`,`target`,`buttons`],[`color`,`light`],[3,`inset`],[3,`ngModelChange`,`ngModel`],[`label`,`CONTROLS.LABEL.STUDENT_REQUEST_TEXT`,`placeholder`,`CONTROLS.LABEL.STUDENT_REQUEST_TEXT_PLACEHOLDER`,3,`valueChange`,`value`],[`interface`,`popover`,3,`ngModelChange`,`ngModel`,`label`,`helperText`],[3,`value`],[`interface`,`popover`,`multiple`,``,3,`ngModelChange`,`ngModel`,`label`],[3,`ionChange`,`ngModelChange`,`ngModel`],[`color`,`secondary`,`label`,`CONTROLS.LABEL.Start date`,`name`,`startDate`,`type`,`date-time`,3,`valueChange`,`readonly`,`value`],[`color`,`secondary`,`label`,`CONTROLS.LABEL.End date`,`name`,`endDate`,`type`,`date-time`,3,`valueChange`,`readonly`,`value`],[`color`,`danger`,1,`ion-text-center`]],template:function(t,a){t&1&&(Fi(0,`ion-header`,0)(1,`app-header`,1),Vh(`buttonClick`,function(K){return a.buttonClicked(K)}),fl()(),Fi(2,`ion-content`,2),mh(3,le,3,2),UD(4,3,Z),fl()),t&2&&(Ah(`translucent`,!0),_E(),Ah(`canGoBack`,!0)(`target`,a.permissionsTarget)(`buttons`,a.model()?.phase!==5?a.headerButtons:nb(5,ee)),_E(3),WD(a.model()))},dependencies:[Ub,af,My,Se],styles:[`ion-select[_ngcontent-%COMP%]::part(label){color:var(--%NS%ion-color-primary)}ion-toggle[_ngcontent-%COMP%]::part(label){color:var(--%NS%ion-color-primary)}`]})}}return n})();export{he as PracticeRequestsPage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.