@rangertechnologies/ngnxt 2.1.48 → 2.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/custom-calendar/custom-calendar.component.mjs +96 -25
- package/esm2022/lib/components/custom-model/custom-model.component.mjs +3 -3
- package/esm2022/lib/components/custom-time/custom-time.component.mjs +3 -2
- package/esm2022/lib/nxt-app.module.mjs +3 -1
- package/esm2022/lib/pages/booklet/booklet.component.mjs +82 -4
- package/esm2022/lib/pages/questionbook/questionbook.component.mjs +57 -44
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/rangertechnologies-ngnxt.mjs +434 -269
- package/fesm2022/rangertechnologies-ngnxt.mjs.map +1 -1
- package/lib/components/custom-calendar/custom-calendar.component.d.ts +8 -3
- package/lib/nxt-app.module.d.ts +1 -1
- package/lib/pages/booklet/booklet.component.d.ts +5 -1
- package/lib/pages/questionbook/questionbook.component.d.ts +4 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/rangertechnologies-ngnxt-2.1.49.tgz +0 -0
- package/rangertechnologies-ngnxt-2.1.48.tgz +0 -0
|
@@ -4254,241 +4254,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4254
4254
|
}]
|
|
4255
4255
|
}], ctorParameters: function () { return []; } });
|
|
4256
4256
|
|
|
4257
|
-
class CustomModelComponent {
|
|
4258
|
-
constructor() { }
|
|
4259
|
-
modalTitle;
|
|
4260
|
-
isModalOpen = false;
|
|
4261
|
-
modalSize = '';
|
|
4262
|
-
saveButtonValue = 'Save';
|
|
4263
|
-
modalFooter = true;
|
|
4264
|
-
saveButtonEmit = new EventEmitter();
|
|
4265
|
-
cancelButtonEmit = new EventEmitter();
|
|
4266
|
-
onSave() {
|
|
4267
|
-
this.saveButtonEmit.emit();
|
|
4268
|
-
}
|
|
4269
|
-
onCancel() {
|
|
4270
|
-
this.cancelButtonEmit.emit();
|
|
4271
|
-
}
|
|
4272
|
-
ngOnInit() {
|
|
4273
|
-
}
|
|
4274
|
-
closeModal() {
|
|
4275
|
-
this.cancelButtonEmit.emit(false);
|
|
4276
|
-
}
|
|
4277
|
-
saveModal() {
|
|
4278
|
-
this.saveButtonEmit.emit();
|
|
4279
|
-
}
|
|
4280
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4281
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomModelComponent, selector: "app-custom-model", inputs: { modalTitle: "modalTitle", isModalOpen: "isModalOpen", modalSize: "modalSize", saveButtonValue: "saveButtonValue", modalFooter: "modalFooter" }, outputs: { saveButtonEmit: "saveButtonEmit", cancelButtonEmit: "cancelButtonEmit" }, ngImport: i0, template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n <button (click)=\"onCancel()\">Cancel</button>\n </div>\n </div>\n </div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:#000;background-color:#0006}.modal-content{background-color:#fefefe;margin:10% auto;padding:20px;border:1px solid #888;width:70%}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4282
|
-
}
|
|
4283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, decorators: [{
|
|
4284
|
-
type: Component,
|
|
4285
|
-
args: [{ selector: 'app-custom-model', template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n <button (click)=\"onCancel()\">Cancel</button>\n </div>\n </div>\n </div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:#000;background-color:#0006}.modal-content{background-color:#fefefe;margin:10% auto;padding:20px;border:1px solid #888;width:70%}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}\n"] }]
|
|
4286
|
-
}], ctorParameters: function () { return []; }, propDecorators: { modalTitle: [{
|
|
4287
|
-
type: Input
|
|
4288
|
-
}], isModalOpen: [{
|
|
4289
|
-
type: Input
|
|
4290
|
-
}], modalSize: [{
|
|
4291
|
-
type: Input
|
|
4292
|
-
}], saveButtonValue: [{
|
|
4293
|
-
type: Input
|
|
4294
|
-
}], modalFooter: [{
|
|
4295
|
-
type: Input
|
|
4296
|
-
}], saveButtonEmit: [{
|
|
4297
|
-
type: Output
|
|
4298
|
-
}], cancelButtonEmit: [{
|
|
4299
|
-
type: Output
|
|
4300
|
-
}] } });
|
|
4301
|
-
|
|
4302
|
-
class CustomCalendarComponent {
|
|
4303
|
-
eventSelected = new EventEmitter();
|
|
4304
|
-
allEvents = [];
|
|
4305
|
-
question;
|
|
4306
|
-
entries = [];
|
|
4307
|
-
referenceQuestions = [];
|
|
4308
|
-
qbRefrenceBook;
|
|
4309
|
-
calendarQuestion = [];
|
|
4310
|
-
currentDate = new Date();
|
|
4311
|
-
calendarDays = [];
|
|
4312
|
-
daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
4313
|
-
newEventTitle = '';
|
|
4314
|
-
newEventTime = '';
|
|
4315
|
-
newDescription = '';
|
|
4316
|
-
newLink = '';
|
|
4317
|
-
selectedDay = null;
|
|
4318
|
-
isModalOpen = false;
|
|
4319
|
-
modalTitle = 'Custom Modal';
|
|
4320
|
-
modalSize = 'large';
|
|
4321
|
-
saveButtonValue = 'Save';
|
|
4322
|
-
modalFooter = true;
|
|
4323
|
-
editingEventId;
|
|
4324
|
-
ngOnInit() {
|
|
4325
|
-
if (this.question?.input) {
|
|
4326
|
-
this.allEvents = this.question.input;
|
|
4327
|
-
}
|
|
4328
|
-
this.processQuestion();
|
|
4329
|
-
this.generateCalendar();
|
|
4330
|
-
}
|
|
4331
|
-
processQuestion() {
|
|
4332
|
-
this.entries = JSON.parse(this.question['Fields_Meta__c']);
|
|
4333
|
-
this.qbRefrenceBook = JSON.parse(this.question['QB_Reference_Questions__c']);
|
|
4334
|
-
let title = this.qbRefrenceBook?.questionbook?.Title__c;
|
|
4335
|
-
this.modalTitle = title;
|
|
4336
|
-
this.referenceQuestions = [];
|
|
4337
|
-
if (this.entries.length > 0) {
|
|
4338
|
-
this.entries.forEach(element => {
|
|
4339
|
-
if (element.questionReference) {
|
|
4340
|
-
let qReference = JSON.parse(element.questionReference);
|
|
4341
|
-
this.referenceQuestions.push(qReference?.question);
|
|
4342
|
-
}
|
|
4343
|
-
});
|
|
4344
|
-
}
|
|
4345
|
-
console.log('entries-->');
|
|
4346
|
-
console.log('question-->');
|
|
4347
|
-
console.log(this.entries);
|
|
4348
|
-
console.log(this.referenceQuestions);
|
|
4349
|
-
}
|
|
4350
|
-
generateCalendar() {
|
|
4351
|
-
const year = this.currentDate.getFullYear();
|
|
4352
|
-
const month = this.currentDate.getMonth();
|
|
4353
|
-
const startOfMonth = new Date(year, month, 1);
|
|
4354
|
-
const endOfMonth = new Date(year, month + 1, 0);
|
|
4355
|
-
const startDayOfWeek = startOfMonth.getDay();
|
|
4356
|
-
const endDayOfWeek = endOfMonth.getDay();
|
|
4357
|
-
const startDate = new Date(startOfMonth);
|
|
4358
|
-
startDate.setDate(startDate.getDate() - startDayOfWeek);
|
|
4359
|
-
const endDate = new Date(endOfMonth);
|
|
4360
|
-
endDate.setDate(endDate.getDate() + (6 - endDayOfWeek));
|
|
4361
|
-
const today = new Date(new Date().setHours(0, 0, 0, 0));
|
|
4362
|
-
this.calendarDays = [];
|
|
4363
|
-
for (let d = new Date(startDate); d <= endDate; d.setDate(d.getDate() + 1)) {
|
|
4364
|
-
const date = new Date(d);
|
|
4365
|
-
this.calendarDays.push({
|
|
4366
|
-
date: date,
|
|
4367
|
-
events: [],
|
|
4368
|
-
isCurrentMonth: d.getMonth() === month,
|
|
4369
|
-
isPast: date < today,
|
|
4370
|
-
isToday: date.getTime() === today.getTime(),
|
|
4371
|
-
isFuture: date > today,
|
|
4372
|
-
});
|
|
4373
|
-
}
|
|
4374
|
-
// Populate calendar with events from allEvents array
|
|
4375
|
-
this.calendarDays.forEach(day => {
|
|
4376
|
-
day.events = this.allEvents.filter(event => event.date.toDateString() === day.date.toDateString());
|
|
4377
|
-
});
|
|
4378
|
-
this.eventSelected.emit(this.allEvents);
|
|
4379
|
-
}
|
|
4380
|
-
selectDay(day) {
|
|
4381
|
-
console.log(day);
|
|
4382
|
-
this.selectedDay = day;
|
|
4383
|
-
// this.eventSelected.emit(day?.events);
|
|
4384
|
-
const previouslySelectedDay = this.calendarDays.find(d => d.isSelected);
|
|
4385
|
-
if (previouslySelectedDay) {
|
|
4386
|
-
previouslySelectedDay.isSelected = false;
|
|
4387
|
-
}
|
|
4388
|
-
// Select the clicked day
|
|
4389
|
-
day.isSelected = true;
|
|
4390
|
-
}
|
|
4391
|
-
previousMonth() {
|
|
4392
|
-
this.currentDate.setMonth(this.currentDate.getMonth() - 1);
|
|
4393
|
-
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
4394
|
-
this.generateCalendar();
|
|
4395
|
-
}
|
|
4396
|
-
nextMonth() {
|
|
4397
|
-
this.currentDate.setMonth(this.currentDate.getMonth() + 1);
|
|
4398
|
-
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
4399
|
-
this.generateCalendar();
|
|
4400
|
-
}
|
|
4401
|
-
addAppointment() {
|
|
4402
|
-
this.isModalOpen = true;
|
|
4403
|
-
this.calendarQuestion = this.referenceQuestions.map(q => ({ ...q, input: '' }));
|
|
4404
|
-
this.referenceQuestions.forEach(ques => {
|
|
4405
|
-
// clear the input
|
|
4406
|
-
if (ques.input) {
|
|
4407
|
-
delete ques.input;
|
|
4408
|
-
}
|
|
4409
|
-
});
|
|
4410
|
-
console.log(' console.log(this.referenceQuestions);');
|
|
4411
|
-
console.log(this.referenceQuestions);
|
|
4412
|
-
this.editingEventId = null;
|
|
4413
|
-
}
|
|
4414
|
-
editEvent(event) {
|
|
4415
|
-
this.isModalOpen = true;
|
|
4416
|
-
// this.calendarQuestion = event.entries.map(q => ({ ...q }));
|
|
4417
|
-
this.referenceQuestions = event.entries.map(q => ({ ...q }));
|
|
4418
|
-
this.editingEventId = event.id;
|
|
4419
|
-
this.generateCalendar();
|
|
4420
|
-
}
|
|
4421
|
-
deleteEvent(day, eventId) {
|
|
4422
|
-
day.events = day.events.filter(event => event.id !== eventId);
|
|
4423
|
-
this.allEvents = this.allEvents.filter(event => event.id !== eventId);
|
|
4424
|
-
this.generateCalendar();
|
|
4425
|
-
}
|
|
4426
|
-
closeModal() {
|
|
4427
|
-
this.isModalOpen = false;
|
|
4428
|
-
}
|
|
4429
|
-
addEvent(day, entryQues) {
|
|
4430
|
-
const newEvent = {
|
|
4431
|
-
id: this.generateId(),
|
|
4432
|
-
date: day.date,
|
|
4433
|
-
entries: entryQues.map(q => ({ ...q }))
|
|
4434
|
-
};
|
|
4435
|
-
day.events.push(newEvent);
|
|
4436
|
-
this.allEvents.push(newEvent);
|
|
4437
|
-
this.generateCalendar();
|
|
4438
|
-
console.log('allEvents');
|
|
4439
|
-
console.log(this.allEvents);
|
|
4440
|
-
this.generateCalendar();
|
|
4441
|
-
}
|
|
4442
|
-
onSave() {
|
|
4443
|
-
if (this.editingEventId !== null) {
|
|
4444
|
-
const event = this.allEvents.find(e => e.id === this.editingEventId);
|
|
4445
|
-
if (event) {
|
|
4446
|
-
event.entries = this.calendarQuestion.map(q => ({ ...q }));
|
|
4447
|
-
}
|
|
4448
|
-
}
|
|
4449
|
-
else {
|
|
4450
|
-
if (this.selectedDay) {
|
|
4451
|
-
this.addEvent(this.selectedDay, this.calendarQuestion);
|
|
4452
|
-
}
|
|
4453
|
-
}
|
|
4454
|
-
this.closeModal();
|
|
4455
|
-
this.generateCalendar();
|
|
4456
|
-
}
|
|
4457
|
-
onCancel() {
|
|
4458
|
-
console.log('Cancel button clicked');
|
|
4459
|
-
this.closeModal();
|
|
4460
|
-
}
|
|
4461
|
-
handleQuestionEvent(ques) {
|
|
4462
|
-
// Update the questions array with the new question
|
|
4463
|
-
const index = this.calendarQuestion.findIndex(q => q.Id === ques.Id);
|
|
4464
|
-
if (index > -1) {
|
|
4465
|
-
// If question already exists, update it
|
|
4466
|
-
this.calendarQuestion[index] = ques;
|
|
4467
|
-
}
|
|
4468
|
-
else {
|
|
4469
|
-
// If question doesn't exist, add it to the array
|
|
4470
|
-
this.calendarQuestion.push(ques);
|
|
4471
|
-
}
|
|
4472
|
-
console.log('calender question');
|
|
4473
|
-
console.log(this.calendarQuestion);
|
|
4474
|
-
}
|
|
4475
|
-
generateId() {
|
|
4476
|
-
return '_' + Math.random().toString(36).substr(2, 9);
|
|
4477
|
-
}
|
|
4478
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4479
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: { allEvents: "allEvents", question: "question" }, outputs: { eventSelected: "eventSelected" }, ngImport: i0, template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <!-- Days of the Week Header -->\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n \n <!-- Calendar Days -->\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\" \n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}</div>\n <div *ngFor=\"let event of day.events\" class=\"event\">\n <div *ngFor=\"let entry of event?.entries\">\n <div *ngIf=\"entry.Type__c == 'Time'\">{{ entry.input?.value | date: 'shortTime' }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <div class=\"appointments-container\">\n <h4 *ngIf=\"selectedDay?.events.length > 0\">Appointments</h4>\n <div class=\"event\" *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event-info\">\n <div>\n <div *ngFor=\"let entry of event?.entries\">\n <div *ngIf=\"entry.Type__c != 'Time'\">{{ entry.input }}</div>\n <div *ngIf=\"entry.Type__c == 'Time'\">{{ entry.input?.value | date: 'mediumDate' }}</div>\n </div>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event)\">Edit</button>\n <button (click)=\"deleteEvent(selectedDay, event.id)\">Delete</button>\n </div>\n </div> \n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<app-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></app-questionbook>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:2;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CustomModelComponent, selector: "app-custom-model", inputs: ["modalTitle", "isModalOpen", "modalSize", "saveButtonValue", "modalFooter"], outputs: ["saveButtonEmit", "cancelButtonEmit"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
4480
|
-
}
|
|
4481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, decorators: [{
|
|
4482
|
-
type: Component,
|
|
4483
|
-
args: [{ selector: 'app-custom-calendar', template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <!-- Days of the Week Header -->\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n \n <!-- Calendar Days -->\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\" \n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}</div>\n <div *ngFor=\"let event of day.events\" class=\"event\">\n <div *ngFor=\"let entry of event?.entries\">\n <div *ngIf=\"entry.Type__c == 'Time'\">{{ entry.input?.value | date: 'shortTime' }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <div class=\"appointments-container\">\n <h4 *ngIf=\"selectedDay?.events.length > 0\">Appointments</h4>\n <div class=\"event\" *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event-info\">\n <div>\n <div *ngFor=\"let entry of event?.entries\">\n <div *ngIf=\"entry.Type__c != 'Time'\">{{ entry.input }}</div>\n <div *ngIf=\"entry.Type__c == 'Time'\">{{ entry.input?.value | date: 'mediumDate' }}</div>\n </div>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event)\">Edit</button>\n <button (click)=\"deleteEvent(selectedDay, event.id)\">Delete</button>\n </div>\n </div> \n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<app-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></app-questionbook>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:2;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}\n"] }]
|
|
4484
|
-
}], propDecorators: { eventSelected: [{
|
|
4485
|
-
type: Output
|
|
4486
|
-
}], allEvents: [{
|
|
4487
|
-
type: Input
|
|
4488
|
-
}], question: [{
|
|
4489
|
-
type: Input
|
|
4490
|
-
}] } });
|
|
4491
|
-
|
|
4492
4257
|
class SearchBoxComponent {
|
|
4493
4258
|
sfService;
|
|
4494
4259
|
dataService;
|
|
@@ -5056,8 +4821,9 @@ class CustomTimeComponent {
|
|
|
5056
4821
|
}
|
|
5057
4822
|
}
|
|
5058
4823
|
}
|
|
4824
|
+
// VD 06Sep24 emit exact time object
|
|
5059
4825
|
onTimeChange(event) {
|
|
5060
|
-
this.timeChange.emit(event);
|
|
4826
|
+
this.timeChange.emit(event?.value);
|
|
5061
4827
|
}
|
|
5062
4828
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTimeComponent, deps: [{ token: I18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5063
4829
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomTimeComponent, selector: "app-custom-time", inputs: { time: "time", readOnly: "readOnly", error: "error", errorMessage: "errorMessage" }, outputs: { timeChange: "timeChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- time component -->\n<!-- // VD 12Jun24 - readonly change-->\n<!-- VD 01Aug24 - validation change-->\n <p>\n <input\n [class]=\"error ? 'invalid' : ''\"\n [(ngModel)]=\"timeSelected\"\n [owlDateTimeTrigger]=\"dt2\"\n [owlDateTime]=\"dt2\"\n placeholder=\"HH:MM\"\n [readOnly]=\"readOnly\" \n style=\"width: 100%; height: 35px; border: none; box-shadow: none; border-bottom: 1px solid #ccc;\"\n (dateTimeChange)=\"onTimeChange($event)\"\n >\n <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\n </p>\n <span *ngIf=\"error\" class=\"error-msg\">{{errorMessage}}</span>", styles: [".invalid{border-color:red!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.OwlDateTimeTriggerDirective, selector: "[owlDateTimeTrigger]", inputs: ["disabled", "owlDateTimeTrigger"] }, { kind: "directive", type: i4$1.OwlDateTimeInputDirective, selector: "input[owlDateTime]", inputs: ["rangeSeparator", "owlDateTime", "owlDateTimeFilter", "min", "max", "selectMode", "value", "values", "_disabled"], outputs: ["dateTimeChange", "dateTimeInput"], exportAs: ["owlDateTimeInput"] }, { kind: "component", type: i4$1.OwlDateTimeComponent, selector: "owl-date-time", inputs: ["startAt", "pickerType", "pickerMode", "disabled", "opened", "backdropClass", "panelClass", "scrollStrategy"], outputs: ["afterPickerClosed", "afterPickerOpen", "yearSelected", "monthSelected"], exportAs: ["owlDateTime"] }] });
|
|
@@ -5279,6 +5045,8 @@ class QuestionbookComponent {
|
|
|
5279
5045
|
bookStyle;
|
|
5280
5046
|
subscription;
|
|
5281
5047
|
hadleDropDownDependent = new EventEmitter();
|
|
5048
|
+
// VD 06Sep24 calendar changes
|
|
5049
|
+
handleCalendarDate = new EventEmitter();
|
|
5282
5050
|
bookQuestionsMap = new Map();
|
|
5283
5051
|
constructor(sfService, dataService, changeService, storageService, i18nService, document) {
|
|
5284
5052
|
this.sfService = sfService;
|
|
@@ -5339,41 +5107,41 @@ class QuestionbookComponent {
|
|
|
5339
5107
|
qb['questionbook'].Style__c = this.qbItem.Style__c;
|
|
5340
5108
|
}
|
|
5341
5109
|
// Book type question styling
|
|
5342
|
-
qb['questionbook'].Style__c.labelClass = qb['questionbook'].Style__c
|
|
5343
|
-
qb['questionbook'].Style__c.labelStyle = qb['questionbook'].Style__c
|
|
5344
|
-
qb['questionbook'].Style__c.labelValueStyle = qb['questionbook'].
|
|
5345
|
-
qb['questionbook'].Style__c.inputClass = qb['questionbook'].Style__c
|
|
5346
|
-
qb['questionbook'].Style__c.inputStyle = qb['questionbook'].Style__c
|
|
5347
|
-
qb['questionbook'].Style__c.bookStyle = qb['questionbook'].Style__c
|
|
5348
|
-
qb['questionbook'].Style__c.showLabel = qb['questionbook'].Style__c
|
|
5349
|
-
qb['questionbook'].Style__c.questionStyle = qb['questionbook'].Style__c
|
|
5350
|
-
qb['langDirection'] = qb['questionbook'].Style__c.direction ? qb['questionbook'].Style__c
|
|
5110
|
+
qb['questionbook'].Style__c.labelClass = qb['questionbook'].Style__c?.labelClass ? qb['questionbook'].Style__c?.labelClass : "";
|
|
5111
|
+
qb['questionbook'].Style__c.labelStyle = qb['questionbook'].Style__c?.labelStyle ? qb['questionbook'].Style__c?.labelStyle : "";
|
|
5112
|
+
qb['questionbook'].Style__c.labelValueStyle = qb['questionbook'].Style__?.labelValueStyle ? qb['questionbook'].Style__c.labelValueStyle : "";
|
|
5113
|
+
qb['questionbook'].Style__c.inputClass = qb['questionbook'].Style__c?.inputClass ? qb['questionbook'].Style__c?.inputClass : "";
|
|
5114
|
+
qb['questionbook'].Style__c.inputStyle = qb['questionbook'].Style__c?.inputStyle ? qb['questionbook'].Style__c?.inputStyle : "";
|
|
5115
|
+
qb['questionbook'].Style__c.bookStyle = qb['questionbook'].Style__c?.bookStyle ? qb['questionbook'].Style__c?.bookStyle : "";
|
|
5116
|
+
qb['questionbook'].Style__c.showLabel = qb['questionbook'].Style__c?.showLabel ? qb['questionbook'].Style__c?.showLabel : true;
|
|
5117
|
+
qb['questionbook'].Style__c.questionStyle = qb['questionbook'].Style__c?.questionStyle ? qb['questionbook'].Style__c?.questionStyle : "";
|
|
5118
|
+
qb['langDirection'] = qb['questionbook'].Style__c.direction ? qb['questionbook'].Style__c?.direction : this.langDirection;
|
|
5351
5119
|
// Loop for each question in the book
|
|
5352
5120
|
qb['questionbook'].Questions__r.records.forEach(questionFromBook => {
|
|
5353
5121
|
questionFromBook.Style__c = questionFromBook.Style__c ? questionFromBook.Style__c : qb['questionbook'].Style__c;
|
|
5354
|
-
questionFromBook.Style__c.labelClass = questionFromBook.Style__c
|
|
5355
|
-
questionFromBook.Style__c.labelStyle = questionFromBook.Style__c
|
|
5356
|
-
questionFromBook.Style__c.labelValueStyle = questionFromBook.Style__c
|
|
5357
|
-
questionFromBook.Style__c.inputClass = questionFromBook.Style__c
|
|
5358
|
-
questionFromBook.Style__c.inputStyle = questionFromBook.Style__c
|
|
5359
|
-
questionFromBook.Style__c.bookStyle = questionFromBook.Style__c
|
|
5360
|
-
questionFromBook.Style__c.showLabel = questionFromBook.Style__c
|
|
5361
|
-
questionFromBook.Style__c.questionStyle = questionFromBook.Style__c
|
|
5362
|
-
questionFromBook['langDirection'] = questionFromBook.Style__c
|
|
5122
|
+
questionFromBook.Style__c.labelClass = questionFromBook.Style__c?.labelClass ? questionFromBook.Style__c?.labelClass : "";
|
|
5123
|
+
questionFromBook.Style__c.labelStyle = questionFromBook.Style__c?.labelStyle ? questionFromBook.Style__c?.labelStyle : "";
|
|
5124
|
+
questionFromBook.Style__c.labelValueStyle = questionFromBook.Style__c?.labelValueStyle ? questionFromBook.Style__c?.labelValueStyle : "";
|
|
5125
|
+
questionFromBook.Style__c.inputClass = questionFromBook.Style__c?.inputClass ? questionFromBook.Style__c?.inputClass : "";
|
|
5126
|
+
questionFromBook.Style__c.inputStyle = questionFromBook.Style__c?.inputStyle ? questionFromBook.Style__c?.inputStyle : "";
|
|
5127
|
+
questionFromBook.Style__c.bookStyle = questionFromBook.Style__c?.bookStyle ? questionFromBook.Style__c?.bookStyle : "";
|
|
5128
|
+
questionFromBook.Style__c.showLabel = questionFromBook.Style__c?.showLabel ? questionFromBook.Style__c?.showLabel : true;
|
|
5129
|
+
questionFromBook.Style__c.questionStyle = questionFromBook.Style__c?.questionStyle ? questionFromBook.Style__c?.questionStyle : "";
|
|
5130
|
+
questionFromBook['langDirection'] = questionFromBook.Style__c?.direction ? questionFromBook.Style__c?.direction : this.langDirection;
|
|
5363
5131
|
});
|
|
5364
5132
|
element['qbItem'] = qb['questionbook'];
|
|
5365
5133
|
}
|
|
5366
5134
|
}
|
|
5367
5135
|
element.Style__c = element.Style__c ? typeof element.Style__c === 'string' ? JSON.parse('' + element?.Style__c) : element?.Style__c : this.qbItem?.Style__c;
|
|
5368
|
-
element.Style__c.labelClass = element.Style__c
|
|
5369
|
-
element.Style__c.labelStyle = element.Style__c
|
|
5370
|
-
element.Style__c.labelValueStyle = element.Style__c
|
|
5371
|
-
element.Style__c.inputClass = element.Style__c
|
|
5372
|
-
element.Style__c.inputStyle = element.Style__c.inputStyle ? element.Style__c
|
|
5373
|
-
element.Style__c.bookStyle = element.Style__c
|
|
5374
|
-
element.Style__c.showLabel = element.Style__c
|
|
5375
|
-
element.Style__c.questionStyle = element.Style__c
|
|
5376
|
-
element['langDirection'] = element.Style__c
|
|
5136
|
+
element.Style__c.labelClass = element.Style__c?.labelClass ? element.Style__c?.labelClass : "";
|
|
5137
|
+
element.Style__c.labelStyle = element.Style__c?.labelStyle ? element.Style__c?.labelStyle : "";
|
|
5138
|
+
element.Style__c.labelValueStyle = element.Style__c?.labelValueStyle ? element.Style__c.labelValueStyle : "";
|
|
5139
|
+
element.Style__c.inputClass = element.Style__c?.inputClass ? element.Style__c?.inputClass : "";
|
|
5140
|
+
element.Style__c.inputStyle = element.Style__c.inputStyle ? element.Style__c?.inputStyle : "";
|
|
5141
|
+
element.Style__c.bookStyle = element.Style__c?.bookStyle ? element.Style__c?.bookStyle : "";
|
|
5142
|
+
element.Style__c.showLabel = element.Style__c?.showLabel ? element.Style__c?.showLabel : true;
|
|
5143
|
+
element.Style__c.questionStyle = element.Style__c?.questionStyle ? element.Style__c?.questionStyle : "";
|
|
5144
|
+
element['langDirection'] = element.Style__c?.direction ? element.Style__c?.direction : this.langDirection;
|
|
5377
5145
|
//VD 02Aug24 dependent field show/hide changes
|
|
5378
5146
|
if (element.Reference_Field__c) {
|
|
5379
5147
|
element.dependentRef = element.Reference_Field__c;
|
|
@@ -5525,12 +5293,22 @@ class QuestionbookComponent {
|
|
|
5525
5293
|
getDropDown(event) {
|
|
5526
5294
|
this.hadleDropDownDependent.emit(event);
|
|
5527
5295
|
}
|
|
5296
|
+
// VD 06Sep24 calendar changes
|
|
5297
|
+
getCurrentCalendar(event) {
|
|
5298
|
+
this.handleCalendarDate.emit(event);
|
|
5299
|
+
}
|
|
5300
|
+
// VD 06Sep24 remove the special charecters and tags
|
|
5301
|
+
// from the questionText
|
|
5302
|
+
removeCharacters(questionText) {
|
|
5303
|
+
let updatedText = questionText?.replace(/<[^>]*>/g, '');
|
|
5304
|
+
return updatedText;
|
|
5305
|
+
}
|
|
5528
5306
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: ChangeService }, { token: StorageService }, { token: I18nService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
5529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", translatedQuestions: "translatedQuestions", questions: "questions", errorFieldId: "errorFieldId", labelValue: "labelValue", token: "token", dropDownData: "dropDownData" }, outputs: { handleDropDown: "handleDropDown", handleQuestion: "handleQuestion", hadleDropDownDependent: "hadleDropDownDependent" }, ngImport: i0, template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c.showLabel\" [style]=\"ques.Style__c.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c.labelValueStyle\">{{ ques?.Question_Text__c }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\"></app-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i9$1.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address", "question", "apiKey"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "readOnly", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error", "question", "readOnly"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question", "apiMeta"], outputs: ["valueChange"] }, { kind: "component", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: ["allEvents", "question"], outputs: ["eventSelected"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate", "error", "errorMessage", "readOnly"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "component", type: SearchBoxComponent, selector: "lib-search-box", inputs: ["placeHolderText", "question", "apiMeta", "id", "readOnly", "filterName"], outputs: ["searchValueChange"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent"] }, { kind: "component", type: FileUploadComponent, selector: "app-file-upload", inputs: ["allFiles", "limitFileUploading", "isDeleteFileButtonVisible", "isShowNoFileIcon", "tableFile", "question", "error"], outputs: ["selectedFileData", "deletedFileData"] }, { kind: "component", type: DependentTableComponent, selector: "app-dependent-table", inputs: ["alertMessage"] }, { kind: "component", type: CustomLabelComponent, selector: "app-custom-label", inputs: ["labelValue", "labelStyle"] }, { kind: "component", type: TableAppendixComponent, selector: "app-table-appendix", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDateComponent, selector: "app-custom-date", inputs: ["date", "readOnly", "error", "errorMessage"], outputs: ["dateChange"] }, { kind: "component", type: CustomTimeComponent, selector: "app-custom-time", inputs: ["time", "readOnly", "error", "errorMessage"], outputs: ["timeChange"] }, { kind: "component", type: CustomButtonComponent, selector: "app-custom-button", inputs: ["height", "width", "textColor", "buttonText", "value", "backgroundColor"], outputs: ["buttonValue"] }, { kind: "component", type: CustomImageComponent, selector: "app-custom-image", inputs: ["alt", "src", "imageStyle", "question"] }, { kind: "component", type: CustomRadioComponent, selector: "app-custom-radio", inputs: ["options", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }] });
|
|
5307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", translatedQuestions: "translatedQuestions", questions: "questions", errorFieldId: "errorFieldId", labelValue: "labelValue", token: "token", dropDownData: "dropDownData" }, outputs: { handleDropDown: "handleDropDown", handleQuestion: "handleQuestion", hadleDropDownDependent: "hadleDropDownDependent", handleCalendarDate: "handleCalendarDate" }, ngImport: i0, template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c?.showLabel ? ques.Style__c?.showLabel : true\" [style]=\"ques.Style__c?.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c?.labelValueStyle\">{{ removeCharacters(ques?.Question_Text__c) }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <lib-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\" (dateSelected)=\"getCurrentCalendar($event)\"></lib-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text' || ques.Type__c === 'Link'\" >\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i9$1.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address", "question", "apiKey"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "readOnly", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error", "question", "readOnly"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question", "apiMeta"], outputs: ["valueChange"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate", "error", "errorMessage", "readOnly"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "component", type: SearchBoxComponent, selector: "lib-search-box", inputs: ["placeHolderText", "question", "apiMeta", "id", "readOnly", "filterName"], outputs: ["searchValueChange"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent", "handleCalendarDate"] }, { kind: "component", type: FileUploadComponent, selector: "app-file-upload", inputs: ["allFiles", "limitFileUploading", "isDeleteFileButtonVisible", "isShowNoFileIcon", "tableFile", "question", "error"], outputs: ["selectedFileData", "deletedFileData"] }, { kind: "component", type: DependentTableComponent, selector: "app-dependent-table", inputs: ["alertMessage"] }, { kind: "component", type: CustomLabelComponent, selector: "app-custom-label", inputs: ["labelValue", "labelStyle"] }, { kind: "component", type: TableAppendixComponent, selector: "app-table-appendix", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDateComponent, selector: "app-custom-date", inputs: ["date", "readOnly", "error", "errorMessage"], outputs: ["dateChange"] }, { kind: "component", type: CustomTimeComponent, selector: "app-custom-time", inputs: ["time", "readOnly", "error", "errorMessage"], outputs: ["timeChange"] }, { kind: "component", type: CustomButtonComponent, selector: "app-custom-button", inputs: ["height", "width", "textColor", "buttonText", "value", "backgroundColor"], outputs: ["buttonValue"] }, { kind: "component", type: CustomImageComponent, selector: "app-custom-image", inputs: ["alt", "src", "imageStyle", "question"] }, { kind: "component", type: CustomRadioComponent, selector: "app-custom-radio", inputs: ["options", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }] });
|
|
5530
5308
|
}
|
|
5531
5309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, decorators: [{
|
|
5532
5310
|
type: Component,
|
|
5533
|
-
args: [{ selector: 'lib-questionbook', template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c.showLabel\" [style]=\"ques.Style__c.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c.labelValueStyle\">{{ ques?.Question_Text__c }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\"></app-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"] }]
|
|
5311
|
+
args: [{ selector: 'lib-questionbook', template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c?.showLabel ? ques.Style__c?.showLabel : true\" [style]=\"ques.Style__c?.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c?.labelValueStyle\">{{ removeCharacters(ques?.Question_Text__c) }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <lib-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\" (dateSelected)=\"getCurrentCalendar($event)\"></lib-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text' || ques.Type__c === 'Link'\" >\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"] }]
|
|
5534
5312
|
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: ChangeService }, { type: StorageService }, { type: I18nService }, { type: Document, decorators: [{
|
|
5535
5313
|
type: Inject,
|
|
5536
5314
|
args: [DOCUMENT]
|
|
@@ -5556,6 +5334,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5556
5334
|
type: Input
|
|
5557
5335
|
}], hadleDropDownDependent: [{
|
|
5558
5336
|
type: Output
|
|
5337
|
+
}], handleCalendarDate: [{
|
|
5338
|
+
type: Output
|
|
5559
5339
|
}] } });
|
|
5560
5340
|
|
|
5561
5341
|
class BookletComponent {
|
|
@@ -5578,6 +5358,8 @@ class BookletComponent {
|
|
|
5578
5358
|
handleBookletActionEvent = new EventEmitter();
|
|
5579
5359
|
handlePage = new EventEmitter();
|
|
5580
5360
|
hadleDropDownDependent = new EventEmitter();
|
|
5361
|
+
// VD 06Sep24 calendar changes
|
|
5362
|
+
handleCalendarDate = new EventEmitter();
|
|
5581
5363
|
nxtBooklet;
|
|
5582
5364
|
booklet = [];
|
|
5583
5365
|
abItem = {};
|
|
@@ -5592,6 +5374,7 @@ class BookletComponent {
|
|
|
5592
5374
|
langDirection = 'ltr'; // HA 28DEC23 making ltr as default direction
|
|
5593
5375
|
answerList = []; // HA 11-JAN-24 Answerlist to store the minimal value
|
|
5594
5376
|
dataBind = {}; // HA 18-JAN-24 To insert the endpoint value to the question
|
|
5377
|
+
allEvents = []; // VD 06Sep24 calendar changes
|
|
5595
5378
|
constructor(sfService, dataService, storageService, route, sanitizer, changeService, el, i18nService) {
|
|
5596
5379
|
this.sfService = sfService;
|
|
5597
5380
|
this.dataService = dataService;
|
|
@@ -5849,11 +5632,13 @@ class BookletComponent {
|
|
|
5849
5632
|
});
|
|
5850
5633
|
}
|
|
5851
5634
|
// HA 11-JAN-24 handleQues to load question
|
|
5635
|
+
// VD 06Sep24 calendar changes
|
|
5852
5636
|
handleQues(ques) {
|
|
5853
5637
|
// HA 19-JAN-24 If condition is for bind-in, correction
|
|
5854
5638
|
// HA 09FEB24 Adding condition to avoid undefined error
|
|
5855
5639
|
if (this.dataBind && Object.keys(this.dataBind).length > 0) {
|
|
5856
|
-
for (let [key,
|
|
5640
|
+
for (let [key, val] of Object.entries(this.dataBind)) {
|
|
5641
|
+
let value = val;
|
|
5857
5642
|
if (ques.Reference_Field__c === key) {
|
|
5858
5643
|
if (ques.Type__c === 'Dropdown' || ques.Type__c === 'Radio') {
|
|
5859
5644
|
this.sqOptions.forEach(element => {
|
|
@@ -5873,6 +5658,46 @@ class BookletComponent {
|
|
|
5873
5658
|
ques.input = value;
|
|
5874
5659
|
ques.selectedValue = value['address'] ? value['address'] : value;
|
|
5875
5660
|
}
|
|
5661
|
+
// VD 06Sep24 calendar changes for data bindIn
|
|
5662
|
+
else if (ques.Type__c === 'Calendar') {
|
|
5663
|
+
let entries = JSON.parse(ques['Fields_Meta__c']);
|
|
5664
|
+
if (entries) {
|
|
5665
|
+
let referenceQuestions = [];
|
|
5666
|
+
if (entries.length > 0) {
|
|
5667
|
+
entries.forEach(element => {
|
|
5668
|
+
if (element.questionReference) {
|
|
5669
|
+
let qReference = JSON.parse(element.questionReference);
|
|
5670
|
+
referenceQuestions.push(qReference?.question);
|
|
5671
|
+
}
|
|
5672
|
+
});
|
|
5673
|
+
}
|
|
5674
|
+
if (referenceQuestions.length > 0) {
|
|
5675
|
+
value?.forEach(calendarArray => {
|
|
5676
|
+
let date = new Date(calendarArray.date);
|
|
5677
|
+
calendarArray.entries.forEach(inputEntry => {
|
|
5678
|
+
for (let [k, v] of Object.entries(inputEntry)) {
|
|
5679
|
+
referenceQuestions.forEach(field => {
|
|
5680
|
+
if (field.Reference_Field__c == k) {
|
|
5681
|
+
if (field.Type__c === 'Date' || field.Type__c == 'DateTime' || field.Type__c == 'Time') {
|
|
5682
|
+
field.input = new Date(v.toString());
|
|
5683
|
+
}
|
|
5684
|
+
if (field.Type__c === 'Dropdown' || field.Type__c === 'Radio') {
|
|
5685
|
+
field.selectedValue = v;
|
|
5686
|
+
field.input = v;
|
|
5687
|
+
}
|
|
5688
|
+
else {
|
|
5689
|
+
field.input = v;
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
});
|
|
5693
|
+
}
|
|
5694
|
+
});
|
|
5695
|
+
this.addEvent(date, referenceQuestions);
|
|
5696
|
+
});
|
|
5697
|
+
}
|
|
5698
|
+
}
|
|
5699
|
+
ques.input = this.allEvents.length > 0 ? this.allEvents : '';
|
|
5700
|
+
}
|
|
5876
5701
|
else {
|
|
5877
5702
|
ques.input = value;
|
|
5878
5703
|
}
|
|
@@ -5895,6 +5720,33 @@ class BookletComponent {
|
|
|
5895
5720
|
this.answerList.push(question);
|
|
5896
5721
|
}
|
|
5897
5722
|
}
|
|
5723
|
+
// VD 06Sep24 calendar changes for data bindIn
|
|
5724
|
+
addEvent(day, entryQues) {
|
|
5725
|
+
// Transform new entries into the desired format
|
|
5726
|
+
const newEntries = entryQues.reduce((acc, q) => {
|
|
5727
|
+
acc[q.Id] = { ...q };
|
|
5728
|
+
return acc;
|
|
5729
|
+
}, {});
|
|
5730
|
+
// Find if an event already exists for the given date
|
|
5731
|
+
const existingEvent = this.allEvents.find(event => event.date.toDateString() === day.toDateString());
|
|
5732
|
+
if (existingEvent) {
|
|
5733
|
+
// If the event exists, push the new entries to the existing entries
|
|
5734
|
+
const existingEntries = existingEvent.entries.map(entry => ({ ...entry }));
|
|
5735
|
+
existingEntries.push(newEntries);
|
|
5736
|
+
existingEvent.entries = existingEntries;
|
|
5737
|
+
}
|
|
5738
|
+
else {
|
|
5739
|
+
// Create a new event if it doesn't exist for the given date
|
|
5740
|
+
const newEvent = {
|
|
5741
|
+
id: '',
|
|
5742
|
+
date: day,
|
|
5743
|
+
entries: [newEntries] // Wrap the new entries in an array
|
|
5744
|
+
};
|
|
5745
|
+
this.allEvents.push(newEvent);
|
|
5746
|
+
}
|
|
5747
|
+
console.log('all events booklet');
|
|
5748
|
+
console.log(this.allEvents);
|
|
5749
|
+
}
|
|
5898
5750
|
readQuestions(qbId) {
|
|
5899
5751
|
// console.log('inside BookletComponent.readQuestions ' + qbId);
|
|
5900
5752
|
// console.log(this.bookQuestionsMap.size);
|
|
@@ -5947,12 +5799,16 @@ class BookletComponent {
|
|
|
5947
5799
|
getDropDown(event) {
|
|
5948
5800
|
this.hadleDropDownDependent.emit(event);
|
|
5949
5801
|
}
|
|
5802
|
+
// VD 06Sep24 calendar changes
|
|
5803
|
+
getCalendarDate(event) {
|
|
5804
|
+
this.handleCalendarDate.emit(event);
|
|
5805
|
+
}
|
|
5950
5806
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: StorageService }, { token: i1.ActivatedRoute }, { token: i6$1.DomSanitizer }, { token: ChangeService }, { token: i0.ElementRef }, { token: I18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5951
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: BookletComponent, selector: "lib-booklet", inputs: { bookletId: "bookletId", serv: "serv", tkn: "tkn", bookletJSON: "bookletJSON", dropdownDependentData: "dropdownDependentData", labelValue: "labelValue", token: "token", languageCode: "languageCode", fieldRestrictions: "fieldRestrictions", dataBind: "dataBind" }, outputs: { handleBookletActionEvent: "handleBookletActionEvent", handlePage: "handlePage", hadleDropDownDependent: "hadleDropDownDependent" }, usesOnChanges: true, ngImport: i0, template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"ques\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent"] }] });
|
|
5807
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: BookletComponent, selector: "lib-booklet", inputs: { bookletId: "bookletId", serv: "serv", tkn: "tkn", bookletJSON: "bookletJSON", dropdownDependentData: "dropdownDependentData", labelValue: "labelValue", token: "token", languageCode: "languageCode", fieldRestrictions: "fieldRestrictions", dataBind: "dataBind" }, outputs: { handleBookletActionEvent: "handleBookletActionEvent", handlePage: "handlePage", hadleDropDownDependent: "hadleDropDownDependent", handleCalendarDate: "handleCalendarDate" }, usesOnChanges: true, ngImport: i0, template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <!--VD 06Sep24 calendar changes--> \n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" \n [labelValue]=\"labelValue\" \n [questionItem]=\"ques\" \n [translatedQuestions]=\"readTransQuestions(qb.Id)\" \n [questions]=\"readQuestions(qb.Id)\" \n (handleDropDown)=\"getDropDown($event)\"\n (handleCalendarDate)=\"getCalendarDate($event)\"\n ></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent", "handleCalendarDate"] }] });
|
|
5952
5808
|
}
|
|
5953
5809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, decorators: [{
|
|
5954
5810
|
type: Component,
|
|
5955
|
-
args: [{ selector: 'lib-booklet', template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"ques\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"] }]
|
|
5811
|
+
args: [{ selector: 'lib-booklet', template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <!--VD 06Sep24 calendar changes--> \n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" \n [labelValue]=\"labelValue\" \n [questionItem]=\"ques\" \n [translatedQuestions]=\"readTransQuestions(qb.Id)\" \n [questions]=\"readQuestions(qb.Id)\" \n (handleDropDown)=\"getDropDown($event)\"\n (handleCalendarDate)=\"getCalendarDate($event)\"\n ></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"] }]
|
|
5956
5812
|
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: StorageService }, { type: i1.ActivatedRoute }, { type: i6$1.DomSanitizer }, { type: ChangeService }, { type: i0.ElementRef }, { type: I18nService }]; }, propDecorators: { bookletId: [{
|
|
5957
5813
|
type: Input
|
|
5958
5814
|
}], serv: [{
|
|
@@ -5977,6 +5833,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5977
5833
|
type: Output
|
|
5978
5834
|
}], hadleDropDownDependent: [{
|
|
5979
5835
|
type: Output
|
|
5836
|
+
}], handleCalendarDate: [{
|
|
5837
|
+
type: Output
|
|
5980
5838
|
}], dataBind: [{
|
|
5981
5839
|
type: Input
|
|
5982
5840
|
}] } });
|
|
@@ -6263,6 +6121,311 @@ var tamI18n$1 = /*#__PURE__*/Object.freeze({
|
|
|
6263
6121
|
default: tamI18n
|
|
6264
6122
|
});
|
|
6265
6123
|
|
|
6124
|
+
class CustomModelComponent {
|
|
6125
|
+
constructor() { }
|
|
6126
|
+
modalTitle;
|
|
6127
|
+
isModalOpen = false;
|
|
6128
|
+
modalSize = '';
|
|
6129
|
+
saveButtonValue = 'Save';
|
|
6130
|
+
modalFooter = true;
|
|
6131
|
+
saveButtonEmit = new EventEmitter();
|
|
6132
|
+
cancelButtonEmit = new EventEmitter();
|
|
6133
|
+
onSave() {
|
|
6134
|
+
this.saveButtonEmit.emit();
|
|
6135
|
+
}
|
|
6136
|
+
onCancel() {
|
|
6137
|
+
this.cancelButtonEmit.emit();
|
|
6138
|
+
}
|
|
6139
|
+
ngOnInit() {
|
|
6140
|
+
}
|
|
6141
|
+
closeModal() {
|
|
6142
|
+
this.cancelButtonEmit.emit(false);
|
|
6143
|
+
}
|
|
6144
|
+
saveModal() {
|
|
6145
|
+
this.saveButtonEmit.emit();
|
|
6146
|
+
}
|
|
6147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6148
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomModelComponent, selector: "app-custom-model", inputs: { modalTitle: "modalTitle", isModalOpen: "isModalOpen", modalSize: "modalSize", saveButtonValue: "saveButtonValue", modalFooter: "modalFooter" }, outputs: { saveButtonEmit: "saveButtonEmit", cancelButtonEmit: "cancelButtonEmit" }, ngImport: i0, template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <!-- /* VD 06Sep24 styling changes */-->\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onCancel()\">Cancel</button>\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n </div>\n </div>\n</div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:5% auto;padding:20px;border:1px solid #888;width:70%;max-width:90%;max-height:80vh;overflow-y:auto}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.modal-body{max-height:60vh;overflow-y:auto}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-footer button{padding:10px 20px;margin:5px;font-size:16px;border:1px solid #ccc;border-radius:4px;cursor:pointer;background-color:#f5f5f5;color:#333}.modal-footer button:hover{background-color:#e0e0e0;border-color:#bbb}@media (max-width: 768px){.modal-content{width:90%;margin:10% auto}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
6149
|
+
}
|
|
6150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, decorators: [{
|
|
6151
|
+
type: Component,
|
|
6152
|
+
args: [{ selector: 'app-custom-model', template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <!-- /* VD 06Sep24 styling changes */-->\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onCancel()\">Cancel</button>\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n </div>\n </div>\n</div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:5% auto;padding:20px;border:1px solid #888;width:70%;max-width:90%;max-height:80vh;overflow-y:auto}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.modal-body{max-height:60vh;overflow-y:auto}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-footer button{padding:10px 20px;margin:5px;font-size:16px;border:1px solid #ccc;border-radius:4px;cursor:pointer;background-color:#f5f5f5;color:#333}.modal-footer button:hover{background-color:#e0e0e0;border-color:#bbb}@media (max-width: 768px){.modal-content{width:90%;margin:10% auto}}\n"] }]
|
|
6153
|
+
}], ctorParameters: function () { return []; }, propDecorators: { modalTitle: [{
|
|
6154
|
+
type: Input
|
|
6155
|
+
}], isModalOpen: [{
|
|
6156
|
+
type: Input
|
|
6157
|
+
}], modalSize: [{
|
|
6158
|
+
type: Input
|
|
6159
|
+
}], saveButtonValue: [{
|
|
6160
|
+
type: Input
|
|
6161
|
+
}], modalFooter: [{
|
|
6162
|
+
type: Input
|
|
6163
|
+
}], saveButtonEmit: [{
|
|
6164
|
+
type: Output
|
|
6165
|
+
}], cancelButtonEmit: [{
|
|
6166
|
+
type: Output
|
|
6167
|
+
}] } });
|
|
6168
|
+
|
|
6169
|
+
class CustomCalendarComponent {
|
|
6170
|
+
eventSelected = new EventEmitter();
|
|
6171
|
+
// VD 06Sep24 calendar changes
|
|
6172
|
+
dateSelected = new EventEmitter();
|
|
6173
|
+
allEvents = [];
|
|
6174
|
+
question;
|
|
6175
|
+
entries = [];
|
|
6176
|
+
referenceQuestions = [];
|
|
6177
|
+
qbRefrenceBook;
|
|
6178
|
+
calendarQuestion = [];
|
|
6179
|
+
currentDate = new Date();
|
|
6180
|
+
calendarDays = [];
|
|
6181
|
+
daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
6182
|
+
newEventTitle = '';
|
|
6183
|
+
newEventTime = '';
|
|
6184
|
+
newDescription = '';
|
|
6185
|
+
newLink = '';
|
|
6186
|
+
selectedDay = null;
|
|
6187
|
+
isModalOpen = false;
|
|
6188
|
+
modalTitle = 'Custom Modal';
|
|
6189
|
+
modalSize = 'large';
|
|
6190
|
+
saveButtonValue = 'Save';
|
|
6191
|
+
modalFooter = true;
|
|
6192
|
+
editingEventId;
|
|
6193
|
+
editingEntryGroup;
|
|
6194
|
+
showAppoinmentSection = true;
|
|
6195
|
+
ngOnInit() {
|
|
6196
|
+
if (this.question?.input) {
|
|
6197
|
+
this.allEvents = this.question.input;
|
|
6198
|
+
}
|
|
6199
|
+
this.processQuestion();
|
|
6200
|
+
this.generateCalendar();
|
|
6201
|
+
}
|
|
6202
|
+
processQuestion() {
|
|
6203
|
+
this.entries = JSON.parse(this.question['Fields_Meta__c']);
|
|
6204
|
+
this.qbRefrenceBook = JSON.parse(this.question['QB_Reference_Questions__c']);
|
|
6205
|
+
let title = this.qbRefrenceBook?.questionbook?.Title__c;
|
|
6206
|
+
this.modalTitle = title;
|
|
6207
|
+
this.referenceQuestions = [];
|
|
6208
|
+
if (this.entries.length > 0) {
|
|
6209
|
+
this.entries.forEach(element => {
|
|
6210
|
+
if (element.questionReference) {
|
|
6211
|
+
let qReference = JSON.parse(element.questionReference);
|
|
6212
|
+
this.referenceQuestions.push(qReference?.question);
|
|
6213
|
+
}
|
|
6214
|
+
});
|
|
6215
|
+
}
|
|
6216
|
+
console.log('entries-->');
|
|
6217
|
+
console.log('question-->');
|
|
6218
|
+
console.log(this.entries);
|
|
6219
|
+
console.log(this.referenceQuestions);
|
|
6220
|
+
}
|
|
6221
|
+
generateCalendar() {
|
|
6222
|
+
const year = this.currentDate.getFullYear();
|
|
6223
|
+
const month = this.currentDate.getMonth();
|
|
6224
|
+
const startOfMonth = new Date(year, month, 1);
|
|
6225
|
+
const endOfMonth = new Date(year, month + 1, 0);
|
|
6226
|
+
const startDayOfWeek = startOfMonth.getDay();
|
|
6227
|
+
const endDayOfWeek = endOfMonth.getDay();
|
|
6228
|
+
const startDate = new Date(startOfMonth);
|
|
6229
|
+
startDate.setDate(startDate.getDate() - startDayOfWeek);
|
|
6230
|
+
const endDate = new Date(endOfMonth);
|
|
6231
|
+
endDate.setDate(endDate.getDate() + (6 - endDayOfWeek));
|
|
6232
|
+
const today = new Date(new Date().setHours(0, 0, 0, 0));
|
|
6233
|
+
this.calendarDays = [];
|
|
6234
|
+
for (let d = new Date(startDate); d <= endDate; d.setDate(d.getDate() + 1)) {
|
|
6235
|
+
const date = new Date(d);
|
|
6236
|
+
this.calendarDays.push({
|
|
6237
|
+
date: date,
|
|
6238
|
+
events: [],
|
|
6239
|
+
isCurrentMonth: d.getMonth() === month,
|
|
6240
|
+
isPast: date < today,
|
|
6241
|
+
isToday: date.getTime() === today.getTime(),
|
|
6242
|
+
isFuture: date > today,
|
|
6243
|
+
});
|
|
6244
|
+
}
|
|
6245
|
+
// Populate calendar with events from allEvents array
|
|
6246
|
+
this.calendarDays.forEach(day => {
|
|
6247
|
+
day.events = this.allEvents.filter(event => event.date.toDateString() === day.date.toDateString());
|
|
6248
|
+
});
|
|
6249
|
+
this.eventSelected.emit(this.allEvents);
|
|
6250
|
+
// VD 06Sep24 calendar changes
|
|
6251
|
+
let calendar = {};
|
|
6252
|
+
calendar['year'] = year;
|
|
6253
|
+
calendar['month'] = month + 1;
|
|
6254
|
+
console.log(calendar);
|
|
6255
|
+
this.dateSelected.emit(calendar);
|
|
6256
|
+
}
|
|
6257
|
+
selectDay(day) {
|
|
6258
|
+
console.log(day);
|
|
6259
|
+
// VD 06Sep24 calendar changes
|
|
6260
|
+
this.showAppoinmentSection = true;
|
|
6261
|
+
this.selectedDay = day;
|
|
6262
|
+
// this.eventSelected.emit(day?.events);
|
|
6263
|
+
const previouslySelectedDay = this.calendarDays.find(d => d.isSelected);
|
|
6264
|
+
if (previouslySelectedDay) {
|
|
6265
|
+
previouslySelectedDay.isSelected = false;
|
|
6266
|
+
}
|
|
6267
|
+
// Select the clicked day
|
|
6268
|
+
day.isSelected = true;
|
|
6269
|
+
}
|
|
6270
|
+
previousMonth() {
|
|
6271
|
+
this.showAppoinmentSection = false;
|
|
6272
|
+
this.currentDate.setMonth(this.currentDate.getMonth() - 1);
|
|
6273
|
+
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
6274
|
+
this.generateCalendar();
|
|
6275
|
+
}
|
|
6276
|
+
nextMonth() {
|
|
6277
|
+
// VD 06Sep24 calendar changes
|
|
6278
|
+
this.showAppoinmentSection = false;
|
|
6279
|
+
this.currentDate.setMonth(this.currentDate.getMonth() + 1);
|
|
6280
|
+
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
6281
|
+
this.generateCalendar();
|
|
6282
|
+
}
|
|
6283
|
+
addAppointment() {
|
|
6284
|
+
this.isModalOpen = true;
|
|
6285
|
+
this.calendarQuestion = this.referenceQuestions.map(q => ({ ...q, input: '' }));
|
|
6286
|
+
this.referenceQuestions.forEach(ques => {
|
|
6287
|
+
// clear the input
|
|
6288
|
+
if (ques.Type__c == 'Dropdown') {
|
|
6289
|
+
delete ques.input;
|
|
6290
|
+
delete ques.selectedValue;
|
|
6291
|
+
// VD 06Sep24 calendar changes
|
|
6292
|
+
}
|
|
6293
|
+
else {
|
|
6294
|
+
delete ques.input;
|
|
6295
|
+
}
|
|
6296
|
+
});
|
|
6297
|
+
console.log(' console.log(this.referenceQuestions);');
|
|
6298
|
+
console.log(this.referenceQuestions);
|
|
6299
|
+
this.editingEventId = null;
|
|
6300
|
+
}
|
|
6301
|
+
// VD 06Sep24 calendar changes
|
|
6302
|
+
editEvent(event, entryGroup) {
|
|
6303
|
+
this.isModalOpen = true;
|
|
6304
|
+
this.referenceQuestions = Object.values(entryGroup);
|
|
6305
|
+
this.calendarQuestion = [...this.referenceQuestions]; // Make a copy of the current entries to edit
|
|
6306
|
+
this.editingEventId = event.id;
|
|
6307
|
+
this.editingEntryGroup = entryGroup; // Store the entry group being edited
|
|
6308
|
+
this.generateCalendar(); // Regenerate the calendar to reflect changes
|
|
6309
|
+
}
|
|
6310
|
+
deleteEvent(eventId, entryGroup) {
|
|
6311
|
+
const event = this.allEvents.find(e => e.id === eventId);
|
|
6312
|
+
if (event) {
|
|
6313
|
+
// Find the index of the entryGroup to delete
|
|
6314
|
+
const entryIndex = event.entries.indexOf(entryGroup);
|
|
6315
|
+
if (entryIndex > -1) {
|
|
6316
|
+
event.entries.splice(entryIndex, 1); // Remove the specific entry
|
|
6317
|
+
}
|
|
6318
|
+
// If the event has no more entries, remove the event entirely
|
|
6319
|
+
if (event.entries.length === 0) {
|
|
6320
|
+
const eventIndex = this.allEvents.indexOf(event);
|
|
6321
|
+
if (eventIndex > -1) {
|
|
6322
|
+
this.allEvents.splice(eventIndex, 1); // Remove the entire event
|
|
6323
|
+
}
|
|
6324
|
+
}
|
|
6325
|
+
}
|
|
6326
|
+
this.generateCalendar(); // Regenerate the calendar to reflect the changes
|
|
6327
|
+
}
|
|
6328
|
+
closeModal() {
|
|
6329
|
+
this.isModalOpen = false;
|
|
6330
|
+
}
|
|
6331
|
+
// VD 06Sep24 calendar changes
|
|
6332
|
+
addEvent(day, entryQues) {
|
|
6333
|
+
// Transform new entries into the desired format
|
|
6334
|
+
const newEntries = entryQues.reduce((acc, q) => {
|
|
6335
|
+
acc[q.Id] = { ...q };
|
|
6336
|
+
return acc;
|
|
6337
|
+
}, {});
|
|
6338
|
+
// Find an existing event for the given date
|
|
6339
|
+
const existingEvent = day.events.find(event => event.date === day.date);
|
|
6340
|
+
if (existingEvent) {
|
|
6341
|
+
// Merge new entries into the existing event's entries array
|
|
6342
|
+
// Check if the entries array already contains an object with the same ID
|
|
6343
|
+
const existingEntries = existingEvent.entries.map(entry => ({ ...entry }));
|
|
6344
|
+
// Append new entries to the existing entries
|
|
6345
|
+
existingEntries.push(newEntries);
|
|
6346
|
+
existingEvent.entries = existingEntries;
|
|
6347
|
+
}
|
|
6348
|
+
else {
|
|
6349
|
+
// Create a new event if it doesn't exist for the given date
|
|
6350
|
+
const newEvent = {
|
|
6351
|
+
id: this.generateId(),
|
|
6352
|
+
date: day.date,
|
|
6353
|
+
entries: [newEntries] // Wrap the new entries in an array
|
|
6354
|
+
};
|
|
6355
|
+
day.events.push(newEvent);
|
|
6356
|
+
this.allEvents.push(newEvent);
|
|
6357
|
+
}
|
|
6358
|
+
this.generateCalendar();
|
|
6359
|
+
console.log('allEvents', this.allEvents);
|
|
6360
|
+
}
|
|
6361
|
+
// VD 06Sep24 calendar changes
|
|
6362
|
+
onSave() {
|
|
6363
|
+
if (this.editingEventId !== null) {
|
|
6364
|
+
const event = this.allEvents.find(e => e.id === this.editingEventId);
|
|
6365
|
+
if (event && this.editingEntryGroup) {
|
|
6366
|
+
// Update the specific entry group within the event
|
|
6367
|
+
const entryIndex = event.entries.findIndex(entryGroup => entryGroup === this.editingEntryGroup);
|
|
6368
|
+
if (entryIndex > -1) {
|
|
6369
|
+
event.entries[entryIndex] = this.calendarQuestion.reduce((acc, q) => {
|
|
6370
|
+
acc[q.Id] = { ...q };
|
|
6371
|
+
return acc;
|
|
6372
|
+
}, {});
|
|
6373
|
+
}
|
|
6374
|
+
}
|
|
6375
|
+
}
|
|
6376
|
+
else {
|
|
6377
|
+
if (this.selectedDay) {
|
|
6378
|
+
this.addEvent(this.selectedDay, this.calendarQuestion);
|
|
6379
|
+
}
|
|
6380
|
+
}
|
|
6381
|
+
this.closeModal();
|
|
6382
|
+
this.generateCalendar();
|
|
6383
|
+
}
|
|
6384
|
+
onCancel() {
|
|
6385
|
+
console.log('Cancel button clicked');
|
|
6386
|
+
this.closeModal();
|
|
6387
|
+
}
|
|
6388
|
+
handleQuestionEvent(ques) {
|
|
6389
|
+
// Update the questions array with the new question
|
|
6390
|
+
const index = this.calendarQuestion.findIndex(q => q.Id === ques.Id);
|
|
6391
|
+
if (index > -1) {
|
|
6392
|
+
// If question already exists, update it
|
|
6393
|
+
this.calendarQuestion[index] = ques;
|
|
6394
|
+
}
|
|
6395
|
+
else {
|
|
6396
|
+
// If question doesn't exist, add it to the array
|
|
6397
|
+
this.calendarQuestion.push(ques);
|
|
6398
|
+
}
|
|
6399
|
+
console.log('calender question');
|
|
6400
|
+
console.log(this.calendarQuestion);
|
|
6401
|
+
}
|
|
6402
|
+
// VD 06Sep24 calendar changes
|
|
6403
|
+
generateId() {
|
|
6404
|
+
return '_' + Math.random().toString(36).substr(2, 9);
|
|
6405
|
+
}
|
|
6406
|
+
getEntryKeys(entryGroup) {
|
|
6407
|
+
return Object.keys(entryGroup);
|
|
6408
|
+
}
|
|
6409
|
+
removeCharacters(questionText) {
|
|
6410
|
+
let updatedText = questionText?.replace(/<[^>]*>/g, '');
|
|
6411
|
+
return updatedText;
|
|
6412
|
+
}
|
|
6413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: { allEvents: "allEvents", question: "question" }, outputs: { eventSelected: "eventSelected", dateSelected: "dateSelected" }, ngImport: i0, template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\"\n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}\n <span *ngIf=\"day.events.length > 0\" class=\"entry-indicator\" [class.select]=\"day.isSelected\"></span>\n </div>\n <!-- <div *ngFor=\"let event of day.events\" >\n <div *ngFor=\"let entryGroup of event.entries\" class=\"event\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\">\n <div *ngIf=\"entryGroup[key].Type__c == 'Time'\">\n {{ entryGroup[key].input?.value | date: 'shortTime' }}\n </div>\n <div *ngIf=\"entryGroup[key].Type__c != 'Time'\">\n {{ entryGroup[key].input }}\n </div>\n </div>\n </div>\n </div> -->\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <!--VD 06Sep24 calendar updates--> \n <div *ngIf=\"showAppoinmentSection && selectedDay?.events.length > 0\" class=\"appointments-container\">\n <h4>Appointments</h4>\n <div *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event\" *ngFor=\"let entryGroup of event.entries\">\n <div class=\"event-info\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\" class=\"entry-row\">\n <div *ngIf=\"entryGroup[key].Question_Text__c\" class=\"entry-text\">\n {{removeCharacters(entryGroup[key].Question_Text__c)}}:\n </div>\n <div class=\"entry-value\">\n <span *ngIf=\"entryGroup[key].Type__c != 'Time' && entryGroup[key].Type__c != 'Link'\">{{ entryGroup[key].input }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Time'\">{{ entryGroup[key].input | date: 'shortTime' }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Link'\">\n <a href=\"{{entryGroup[key].input}}\">{{removeCharacters(entryGroup[key].Question_Text__c)}}</a>\n </span>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event,entryGroup)\">Edit</button>\n <button (click)=\"deleteEvent(event.id,entryGroup)\">Delete</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<lib-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></lib-questionbook>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:1;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080;background-color:green!important;color:#fff!important}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}.form-group.content-box{padding-bottom:0!important}.entry-indicator{position:absolute;top:5px;right:5px;width:10px;height:10px;background-color:#0f5132;border-radius:50%}.select{background-color:#fff}.entry-row{display:flex;align-items:center;margin-bottom:5px}.entry-text{font-weight:700;margin-right:10px;white-space:nowrap}.entry-value{flex:1;word-break:break-word}.entry-value a{color:#4caf50}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent", "handleCalendarDate"] }, { kind: "component", type: CustomModelComponent, selector: "app-custom-model", inputs: ["modalTitle", "isModalOpen", "modalSize", "saveButtonValue", "modalFooter"], outputs: ["saveButtonEmit", "cancelButtonEmit"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
6415
|
+
}
|
|
6416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, decorators: [{
|
|
6417
|
+
type: Component,
|
|
6418
|
+
args: [{ selector: 'app-custom-calendar', template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\"\n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}\n <span *ngIf=\"day.events.length > 0\" class=\"entry-indicator\" [class.select]=\"day.isSelected\"></span>\n </div>\n <!-- <div *ngFor=\"let event of day.events\" >\n <div *ngFor=\"let entryGroup of event.entries\" class=\"event\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\">\n <div *ngIf=\"entryGroup[key].Type__c == 'Time'\">\n {{ entryGroup[key].input?.value | date: 'shortTime' }}\n </div>\n <div *ngIf=\"entryGroup[key].Type__c != 'Time'\">\n {{ entryGroup[key].input }}\n </div>\n </div>\n </div>\n </div> -->\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <!--VD 06Sep24 calendar updates--> \n <div *ngIf=\"showAppoinmentSection && selectedDay?.events.length > 0\" class=\"appointments-container\">\n <h4>Appointments</h4>\n <div *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event\" *ngFor=\"let entryGroup of event.entries\">\n <div class=\"event-info\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\" class=\"entry-row\">\n <div *ngIf=\"entryGroup[key].Question_Text__c\" class=\"entry-text\">\n {{removeCharacters(entryGroup[key].Question_Text__c)}}:\n </div>\n <div class=\"entry-value\">\n <span *ngIf=\"entryGroup[key].Type__c != 'Time' && entryGroup[key].Type__c != 'Link'\">{{ entryGroup[key].input }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Time'\">{{ entryGroup[key].input | date: 'shortTime' }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Link'\">\n <a href=\"{{entryGroup[key].input}}\">{{removeCharacters(entryGroup[key].Question_Text__c)}}</a>\n </span>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event,entryGroup)\">Edit</button>\n <button (click)=\"deleteEvent(event.id,entryGroup)\">Delete</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<lib-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></lib-questionbook>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:1;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080;background-color:green!important;color:#fff!important}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}.form-group.content-box{padding-bottom:0!important}.entry-indicator{position:absolute;top:5px;right:5px;width:10px;height:10px;background-color:#0f5132;border-radius:50%}.select{background-color:#fff}.entry-row{display:flex;align-items:center;margin-bottom:5px}.entry-text{font-weight:700;margin-right:10px;white-space:nowrap}.entry-value{flex:1;word-break:break-word}.entry-value a{color:#4caf50}\n"] }]
|
|
6419
|
+
}], propDecorators: { eventSelected: [{
|
|
6420
|
+
type: Output
|
|
6421
|
+
}], dateSelected: [{
|
|
6422
|
+
type: Output
|
|
6423
|
+
}], allEvents: [{
|
|
6424
|
+
type: Input
|
|
6425
|
+
}], question: [{
|
|
6426
|
+
type: Input
|
|
6427
|
+
}] } });
|
|
6428
|
+
|
|
6266
6429
|
class LoaderComponent {
|
|
6267
6430
|
loaderService;
|
|
6268
6431
|
isLoading = false;
|
|
@@ -6338,6 +6501,7 @@ class NxtAppModule {
|
|
|
6338
6501
|
ReactiveFormsModule, NgxSpinnerModule, I18nModule, i13.NgCircleProgressModule], exports: [NxtAppComponent,
|
|
6339
6502
|
QuestionnaireComponent,
|
|
6340
6503
|
BookletComponent,
|
|
6504
|
+
QuestionbookComponent,
|
|
6341
6505
|
SummaryPageComponent,
|
|
6342
6506
|
I18nPipe,
|
|
6343
6507
|
I18nComponent] });
|
|
@@ -6566,6 +6730,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
6566
6730
|
exports: [NxtAppComponent,
|
|
6567
6731
|
QuestionnaireComponent,
|
|
6568
6732
|
BookletComponent,
|
|
6733
|
+
QuestionbookComponent,
|
|
6569
6734
|
SummaryPageComponent,
|
|
6570
6735
|
I18nPipe,
|
|
6571
6736
|
I18nComponent,
|
|
@@ -6589,5 +6754,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
6589
6754
|
* Generated bundle index. Do not edit.
|
|
6590
6755
|
*/
|
|
6591
6756
|
|
|
6592
|
-
export { BookletComponent, I18nComponent, I18nPipe, NxtAppComponent, NxtAppModule, NxtAppService, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
|
|
6757
|
+
export { BookletComponent, I18nComponent, I18nPipe, NxtAppComponent, NxtAppModule, NxtAppService, QuestionbookComponent, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
|
|
6593
6758
|
//# sourceMappingURL=rangertechnologies-ngnxt.mjs.map
|