Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_closure(){
return this.isAgreementSelected && this.displayedParagraph && !this.displayedParagraph.canceled && (!this.displayedParagraph.end || this.api.moment(this.displayedParagraph.end).isAfter(moment())) &&
(this.displayedParagraph.start && this.api.moment(this.displayedParagraph.start).isBefore(moment()))
}
${station_name}
${destination !== 'unavailable'
? html` ${destination}`
: html``
}
<div class="entur-row">
<div class="entur-line">
${line.route}
${this._config.show_human
? this.isNowOrHasBeen(line.due_at) === false
? html`<span class="entur-human is-now">${this._translate('arrives')} ${moment(line.due_at, "HH:mm:ss").fromNow()}</span>`
: html`<span class="entur-human has-been">${this._translate('arrived')} ${moment(line.due_at, "HH:mm:ss").fromNow()}</span>`
: html``
}
${this._config.show_next === true && next_line.due_at !== line.due_at
? html`
<div class="entur-next">
${this._translate('next_route')} <em>${next_line.route}</em> ${this._translate('at')} ${next_line.due_at}
</div>`
: html``
}
</div>
${line.delay > 0
? html`
<div class="entur-delay">
</div></div>
_getExportPageHeader(data) {
return `
<article class="page" id="">
<table class="boderGrey bleft0 bright0">
<tbody>
<tr class="bleft0 bright0">
<td class="important colorBlue bleft0 bright0 italic" width="33%">`+ this.localize('flatrateMonthlyInvoicing',this.language) +`</td>
<td class="important colorBlue bleft0 bright0 txt-center uppercase italic" width="33%">`+ this.localize('month_' + parseInt(this.reportCurrentDateMomentObject.format('M')), this.language) + ` `+ this.reportCurrentDateMomentObject.format('YYYY')+`</td>
<td class="important colorBlue bleft0 bright0 txt-right small-txt italic lineHeight14px verticalAlignMiddle" width="33%">`+ this.localize('day_' + parseInt(moment().day()), this.language) + ` ` + moment().format('DD') + ` `+ (this.localize('month_' + parseInt(moment().format('M')), this.language)).toLowerCase() + ` ` + moment().format('YYYY') + `</td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" class="small-txt boderBottomGrey">
<tbody>
<tr class="">
<td width="55%">
<span class="bold uppercase">${_.get(this.user, "name", "")}</span><br>
${_.get(this.hcp, "addresses[0].street", "")} ${_.get(this.hcp, "addresses[0].houseNumber", "")}<br>
${_.get(this.hcp, "addresses[0].postalCode", "")} ${_.get(this.hcp, "addresses[0].city", "")}<br>
` + this.localize('inami',this.language) + `: ${_.get(this.hcp, "nihii", "")}<br>
` + this.localize('adm_ctc_per',this.language) + `: ${_.get(this.hcp, "contactPerson", "")} ${_.get(this.hcp, "addresses[0].telecoms[0].telecomNumber", "")}<br>
</td>
<td width="45%"></td></tr></tbody></table></article>
},
oaData: {
type: Array,
value: () => []
},
archiveListingMessages:{
type:Object,
value: {}
},
downloadFileName: {
type: String,
value: ""
},
reportCurrentDateMomentObject: {
type: Object,
value: moment()
},
reportMonthGap: {
type: Number,
value: 1
}
};
}
list3 : _.compact(_.map(OaPatients, pat=>{ return parseInt(_.size(_.filter(_.get(pat, "medicalHouseContracts", []), mhc=>{ return moment( _.get(mhc, "endOfContract", 0), 'YYYYMMDD').startOf('month').isSame( moment().subtract(this.reportMonthGap, 'month').startOf('month') ) }))) ? pat : false })),
_isChronical(start, end){
return moment(start).isSameOrBefore(moment(end).subtract(6, "month"))
}
return parseInt(_.size(_.filter( _.get(pat, "medicalHouseContracts", []), mhc=>{return(
!!_.trim( _.get(mhc,"suspensionReason","")) &&
( parseInt(_.get(mhc,"startOfSuspension",0)) && moment( _.get(mhc,"startOfSuspension",0)+"", "YYYYMMDD" ).isBefore( moment() ) ) &&
( !parseInt(_.get(mhc,"endOfSuspension",0)) || moment( _.get(mhc,"endOfSuspension",0)+"", "YYYYMMDD" ).isAfter( moment() ) )
)}))) ? pat : false
}))
}); //todo refaire reduce
messages.rows.sort(function (a, b) {
return a.status && (1 << 0) - b.status && 1 << 0;
});
return messages.rows;
}).then(messages => this.set('messages', messages || []));
this.api.bemikrono().appointments(parseInt(moment().format('YYYYMMDD'))).then(appointments => {
return appointments && this.api.patient().getPatients(new models.ListOfIdsDto({ ids: appointments.map(a => a.patientId) })).then(patients => {
//todo wtf JSON not valid
patients.forEach((p, idx) => appointments[idx].patient = p);
return appointments;
});
}).then(appointments => this.set('appointments', appointments || []));
const start = parseInt(moment().subtract(1, 'month').format('YYYYMMDD'));
const end = parseInt(moment().add(1, 'month').format('YYYYMMDD'));
const maxplanningsize = 10;
const sort = 'valueDate';
const desc = 'desc';
const planningFilter = { '$type': 'UnionFilter', 'filters': [{ '$type': 'ServiceByHcPartyTagCodeDateFilter', healthcarePartyId: hcp.id, tagCode: 'planned', tagType: 'CD-LIFECYCLE', startValueDate: start, endValueDate: end }, { '$type': 'ServiceByHcPartyTagCodeDateFilter', healthcarePartyId: hcp.id, tagCode: 'planned', tagType: 'CD-LIFECYCLE', startValueDate: start * 1000000, endValueDate: end * 1000000 }] };
this.api.contact().filterServicesBy(null, null, 1000, new models.FilterChain({ filter: planningFilter })) //todo wtf JSON not valid
.then(planningList => {
const svcDict = planningList.rows.reduce((acc, s) => {
const cs = acc[s.id];
if (!cs || !cs.modified || s.modified && this.api.after(s.modified, cs.modified)) {
acc[s.id] = s;
}
return acc;
}, {});
const services = _.sortBy(Object.values(svcDict).filter(s => !s.endOfLife), [s => +this.api.moment( /*s.modified||s.created||*/s.valueDate)]);
parseDate(s) {
return moment(s, 'DD/MM/YYYY').toDate()
},
formatTitle(monthName, fullYear) {
formatDate: function (d) {
//return moment(d).format(moment.localeData().longDateFormat('L'))
return moment(d).format('DD/MM/YYYY');
},
parseDate: function (s) {