@edvak99/voice-receptionist-widget 1.1.25 → 1.1.26
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/fesm2022/{edvak99-voice-receptionist-widget-activities-page.component-BPPNybgN.mjs → edvak99-voice-receptionist-widget-activities-page.component-BlOth9CN.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-activities-page.component-BPPNybgN.mjs.map → edvak99-voice-receptionist-widget-activities-page.component-BlOth9CN.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-analytics-page.component-DF85frxI.mjs → edvak99-voice-receptionist-widget-analytics-page.component-Cr02cCqy.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-analytics-page.component-DF85frxI.mjs.map → edvak99-voice-receptionist-widget-analytics-page.component-Cr02cCqy.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-audit-page.component-j2am6YsP.mjs → edvak99-voice-receptionist-widget-audit-page.component-IKR5CpVe.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-audit-page.component-j2am6YsP.mjs.map → edvak99-voice-receptionist-widget-audit-page.component-IKR5CpVe.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-call-history-detail-page.component-BkiqQiLl.mjs → edvak99-voice-receptionist-widget-call-history-detail-page.component-pRSrt5C2.mjs} +4 -4
- package/fesm2022/{edvak99-voice-receptionist-widget-call-history-detail-page.component-BkiqQiLl.mjs.map → edvak99-voice-receptionist-widget-call-history-detail-page.component-pRSrt5C2.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-call-history-page.component-C9S0fSHN.mjs → edvak99-voice-receptionist-widget-call-history-page.component-CtdkYCXC.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-call-history-page.component-C9S0fSHN.mjs.map → edvak99-voice-receptionist-widget-call-history-page.component-CtdkYCXC.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-call-recording-player.component-Ds-laZuS.mjs → edvak99-voice-receptionist-widget-call-recording-player.component-D9hxkypQ.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-recording-player.component-Ds-laZuS.mjs.map → edvak99-voice-receptionist-widget-call-recording-player.component-D9hxkypQ.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-Biv9lAkc.mjs → edvak99-voice-receptionist-widget-call-review.service-DhLqgadd.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-Biv9lAkc.mjs.map → edvak99-voice-receptionist-widget-call-review.service-DhLqgadd.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-page.component-DT4r-c3s.mjs → edvak99-voice-receptionist-widget-dashboard-page.component-CoqHpfH4.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-page.component-DT4r-c3s.mjs.map → edvak99-voice-receptionist-widget-dashboard-page.component-CoqHpfH4.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-DMj19tJ_.mjs → edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-CabSa0_n.mjs} +237 -27
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-CabSa0_n.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-live-calls-page.component-DH2CStxl.mjs → edvak99-voice-receptionist-widget-live-calls-page.component-BLJTOY-p.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-live-calls-page.component-DH2CStxl.mjs.map → edvak99-voice-receptionist-widget-live-calls-page.component-BLJTOY-p.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-live-monitor-page.component-BK5A3o91.mjs → edvak99-voice-receptionist-widget-live-monitor-page.component-MS9bpOBv.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-live-monitor-page.component-BK5A3o91.mjs.map → edvak99-voice-receptionist-widget-live-monitor-page.component-MS9bpOBv.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-outbound-purposes-page.component-1mWq-Mxr.mjs → edvak99-voice-receptionist-widget-outbound-purposes-page.component-Wxq3Aqip.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-outbound-purposes-page.component-1mWq-Mxr.mjs.map → edvak99-voice-receptionist-widget-outbound-purposes-page.component-Wxq3Aqip.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-task-detail-drawer.component-D72TZ3ys.mjs → edvak99-voice-receptionist-widget-task-detail-drawer.component-CAsLgIJB.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-task-detail-drawer.component-D72TZ3ys.mjs.map → edvak99-voice-receptionist-widget-task-detail-drawer.component-CAsLgIJB.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-tasks-page.component-C4fVCyFP.mjs → edvak99-voice-receptionist-widget-tasks-page.component-9X8YjNaO.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-tasks-page.component-C4fVCyFP.mjs.map → edvak99-voice-receptionist-widget-tasks-page.component-9X8YjNaO.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-wizard-page.component-C6PRbPAG.mjs → edvak99-voice-receptionist-widget-wizard-page.component-CktmVrGt.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-wizard-page.component-C6PRbPAG.mjs.map → edvak99-voice-receptionist-widget-wizard-page.component-CktmVrGt.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget.mjs +1 -1
- package/lib/models/ai-receptionist.types.d.ts +11 -0
- package/lib/models/api-dto.types.d.ts +10 -0
- package/lib/pages/settings-page/settings-page.component.d.ts +12 -1
- package/lib/services/ai-receptionist-api.mappers.d.ts +2 -1
- package/lib/services/ai-receptionist-api.mock.d.ts +8 -1
- package/lib/services/ai-receptionist-api.service.d.ts +12 -1
- package/package.json +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-DMj19tJ_.mjs.map +0 -1
|
@@ -1221,6 +1221,57 @@ function humanizeSettingsKey(key) {
|
|
|
1221
1221
|
.trim()
|
|
1222
1222
|
.replace(/^\w/, (c) => c.toUpperCase());
|
|
1223
1223
|
}
|
|
1224
|
+
const DEFAULT_BOOKING_MODE_OPTIONS = [
|
|
1225
|
+
{
|
|
1226
|
+
value: 'confirmed',
|
|
1227
|
+
label: 'Confirm appointment',
|
|
1228
|
+
description: 'Creates a live appointment in the EHR (create-new-appointment). The caller hears that they are booked.',
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
value: 'pending',
|
|
1232
|
+
label: 'Pending appointment',
|
|
1233
|
+
description: 'Submits an Online Request for staff review (req-auto-new-appointment). Do not tell the caller the visit is confirmed.',
|
|
1234
|
+
},
|
|
1235
|
+
];
|
|
1236
|
+
function unwrapBookingModePayload(body) {
|
|
1237
|
+
if (!body || typeof body !== 'object')
|
|
1238
|
+
return {};
|
|
1239
|
+
const raw = body;
|
|
1240
|
+
if (typeof raw['bookingMode'] === 'string' || Array.isArray(raw['options'])) {
|
|
1241
|
+
return raw;
|
|
1242
|
+
}
|
|
1243
|
+
if (raw['data'] && typeof raw['data'] === 'object') {
|
|
1244
|
+
return unwrapBookingModePayload(raw['data']);
|
|
1245
|
+
}
|
|
1246
|
+
if (raw['settings'] && typeof raw['settings'] === 'object') {
|
|
1247
|
+
return unwrapBookingModePayload(raw['settings']);
|
|
1248
|
+
}
|
|
1249
|
+
return raw;
|
|
1250
|
+
}
|
|
1251
|
+
function mapBookingModeSettings(body) {
|
|
1252
|
+
const raw = unwrapBookingModePayload(body);
|
|
1253
|
+
const mode = String(raw.bookingMode ?? '').trim().toLowerCase();
|
|
1254
|
+
const bookingMode = mode === 'pending' ? 'pending' : 'confirmed';
|
|
1255
|
+
const options = Array.isArray(raw.options) && raw.options.length
|
|
1256
|
+
? raw.options
|
|
1257
|
+
.map((o) => {
|
|
1258
|
+
const value = String(o?.value ?? '').trim().toLowerCase();
|
|
1259
|
+
if (value !== 'confirmed' && value !== 'pending')
|
|
1260
|
+
return null;
|
|
1261
|
+
return {
|
|
1262
|
+
value: value,
|
|
1263
|
+
label: String(o?.label ?? '').trim() ||
|
|
1264
|
+
(value === 'pending' ? 'Pending appointment' : 'Confirm appointment'),
|
|
1265
|
+
description: String(o?.description ?? '').trim(),
|
|
1266
|
+
};
|
|
1267
|
+
})
|
|
1268
|
+
.filter((o) => !!o)
|
|
1269
|
+
: DEFAULT_BOOKING_MODE_OPTIONS;
|
|
1270
|
+
return {
|
|
1271
|
+
bookingMode,
|
|
1272
|
+
options: options.length ? options : DEFAULT_BOOKING_MODE_OPTIONS,
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1224
1275
|
/** Map frontend AgentSettings → backend PUT body section keys. */
|
|
1225
1276
|
function mapSettingsToRequest(settings) {
|
|
1226
1277
|
return {
|
|
@@ -2365,6 +2416,7 @@ class AiReceptionistApiMockService {
|
|
|
2365
2416
|
this.tasks = signal(cloneTasks());
|
|
2366
2417
|
this.history = signal(cloneHistory());
|
|
2367
2418
|
this.settings = signal(structuredClone(SEED_SETTINGS));
|
|
2419
|
+
this.bookingMode = 'confirmed';
|
|
2368
2420
|
this.status = signal({
|
|
2369
2421
|
agentOn: true,
|
|
2370
2422
|
agentOnExplicit: true,
|
|
@@ -2685,6 +2737,27 @@ class AiReceptionistApiMockService {
|
|
|
2685
2737
|
this.settings.set(saved);
|
|
2686
2738
|
return this.mock(saved);
|
|
2687
2739
|
}
|
|
2740
|
+
getBookingMode() {
|
|
2741
|
+
return this.mock({
|
|
2742
|
+
bookingMode: this.bookingMode,
|
|
2743
|
+
options: [
|
|
2744
|
+
{
|
|
2745
|
+
value: 'confirmed',
|
|
2746
|
+
label: 'Confirm appointment',
|
|
2747
|
+
description: 'Creates a live appointment in the EHR (create-new-appointment). The caller hears that they are booked.',
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
value: 'pending',
|
|
2751
|
+
label: 'Pending appointment',
|
|
2752
|
+
description: 'Submits an Online Request for staff review (req-auto-new-appointment). Do not tell the caller the visit is confirmed.',
|
|
2753
|
+
},
|
|
2754
|
+
],
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
putBookingMode(bookingMode) {
|
|
2758
|
+
this.bookingMode = bookingMode === 'pending' ? 'pending' : 'confirmed';
|
|
2759
|
+
return this.getBookingMode();
|
|
2760
|
+
}
|
|
2688
2761
|
getVoicePromptDefault() {
|
|
2689
2762
|
return of({
|
|
2690
2763
|
defaultVoiceSystemPrompt: 'You are an AI receptionist for a medical practice. Be warm, concise, and HIPAA-aware.',
|
|
@@ -3348,6 +3421,22 @@ class AiReceptionistApiService {
|
|
|
3348
3421
|
.put(`${this.arBase}/settings`, { settings: mapSettingsToRequest(next) })
|
|
3349
3422
|
.pipe(switchMap(() => this.getSettings()), catchError((err) => throwError(() => new Error(this.apiErrorMessage(err, 'Failed to save agent settings')))));
|
|
3350
3423
|
}
|
|
3424
|
+
/**
|
|
3425
|
+
* Practice-level Confirm vs Pending booking mode.
|
|
3426
|
+
* Dedicated endpoint — JWT supplies the practice; do not send practiceId.
|
|
3427
|
+
*/
|
|
3428
|
+
getBookingMode() {
|
|
3429
|
+
if (this.useMock)
|
|
3430
|
+
return this.mock.getBookingMode();
|
|
3431
|
+
return this.http.get(`${this.arBase}/settings/booking-mode`).pipe(map((body) => ({ data: mapBookingModeSettings(body) })), catchError((err) => throwError(() => new Error(this.apiErrorMessage(err, 'Failed to load booking mode')))));
|
|
3432
|
+
}
|
|
3433
|
+
putBookingMode(bookingMode) {
|
|
3434
|
+
if (this.useMock)
|
|
3435
|
+
return this.mock.putBookingMode(bookingMode);
|
|
3436
|
+
return this.http
|
|
3437
|
+
.put(`${this.arBase}/settings/booking-mode`, { bookingMode })
|
|
3438
|
+
.pipe(map((body) => ({ data: mapBookingModeSettings(body) })), catchError((err) => throwError(() => new Error(this.apiErrorMessage(err, 'Failed to save booking mode')))));
|
|
3439
|
+
}
|
|
3351
3440
|
/** Shipped default voice system prompt + max lengths. */
|
|
3352
3441
|
getVoicePromptDefault() {
|
|
3353
3442
|
if (this.useMock)
|
|
@@ -3668,12 +3757,30 @@ class AiReceptionistApiService {
|
|
|
3668
3757
|
apiErrorMessage(err, fallback) {
|
|
3669
3758
|
const body = err.error;
|
|
3670
3759
|
if (typeof body === 'object' && body && 'message' in body) {
|
|
3671
|
-
|
|
3760
|
+
const text = this.coerceErrorText(body.message);
|
|
3761
|
+
if (text)
|
|
3762
|
+
return text;
|
|
3763
|
+
}
|
|
3764
|
+
if (typeof body === 'string' && body.trim() && body !== '[object Object]')
|
|
3765
|
+
return body.trim();
|
|
3766
|
+
if (typeof err.message === 'string' && err.message.trim() && err.message !== '[object Object]') {
|
|
3767
|
+
return err.message.trim();
|
|
3672
3768
|
}
|
|
3673
|
-
if (typeof body === 'string' && body.trim())
|
|
3674
|
-
return body;
|
|
3675
3769
|
return fallback;
|
|
3676
3770
|
}
|
|
3771
|
+
coerceErrorText(value) {
|
|
3772
|
+
if (typeof value === 'string' && value.trim() && value !== '[object Object]') {
|
|
3773
|
+
return value.trim();
|
|
3774
|
+
}
|
|
3775
|
+
if (Array.isArray(value)) {
|
|
3776
|
+
const parts = value.map((item) => this.coerceErrorText(item)).filter((item) => !!item);
|
|
3777
|
+
return parts.length ? parts.join('; ') : null;
|
|
3778
|
+
}
|
|
3779
|
+
if (value && typeof value === 'object' && 'message' in value) {
|
|
3780
|
+
return this.coerceErrorText(value.message);
|
|
3781
|
+
}
|
|
3782
|
+
return null;
|
|
3783
|
+
}
|
|
3677
3784
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AiReceptionistApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3678
3785
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AiReceptionistApiService, providedIn: 'root' }); }
|
|
3679
3786
|
}
|
|
@@ -5076,6 +5183,12 @@ class SettingsPageComponent {
|
|
|
5076
5183
|
this.confirmOffOpen = signal(false);
|
|
5077
5184
|
this.voicePreviewBusy = signal(false);
|
|
5078
5185
|
this.voicePreviewPlaying = signal(false);
|
|
5186
|
+
/** Isolated from main settings body — practice-level EHR booking write path. */
|
|
5187
|
+
this.bookingMode = signal('confirmed');
|
|
5188
|
+
this.bookingModeOptions = signal([]);
|
|
5189
|
+
this.bookingModeLoading = signal(true);
|
|
5190
|
+
this.bookingModeError = signal(null);
|
|
5191
|
+
this.originalBookingMode = null;
|
|
5079
5192
|
this.online = this.agentOnline.online;
|
|
5080
5193
|
this.agentLoading = this.agentOnline.loading;
|
|
5081
5194
|
this.toggling = this.agentOnline.toggling;
|
|
@@ -5172,6 +5285,7 @@ class SettingsPageComponent {
|
|
|
5172
5285
|
next: ({ data }) => this.locations.set(data ?? []),
|
|
5173
5286
|
error: () => this.locations.set([]),
|
|
5174
5287
|
});
|
|
5288
|
+
this.loadBookingMode();
|
|
5175
5289
|
}
|
|
5176
5290
|
ngOnDestroy() {
|
|
5177
5291
|
this.stopVoicePreview();
|
|
@@ -5196,9 +5310,80 @@ class SettingsPageComponent {
|
|
|
5196
5310
|
if (!this.originalSettings)
|
|
5197
5311
|
return;
|
|
5198
5312
|
this.settings.set(structuredClone(this.originalSettings));
|
|
5313
|
+
if (this.originalBookingMode)
|
|
5314
|
+
this.bookingMode.set(this.originalBookingMode);
|
|
5315
|
+
this.bookingModeError.set(null);
|
|
5199
5316
|
this.locationsMenuOpen.set(false);
|
|
5200
5317
|
this.stopVoicePreview();
|
|
5201
5318
|
}
|
|
5319
|
+
loadBookingMode() {
|
|
5320
|
+
this.bookingModeLoading.set(true);
|
|
5321
|
+
this.bookingModeError.set(null);
|
|
5322
|
+
this.api.getBookingMode().subscribe({
|
|
5323
|
+
next: ({ data }) => {
|
|
5324
|
+
this.bookingMode.set(data.bookingMode);
|
|
5325
|
+
this.originalBookingMode = data.bookingMode;
|
|
5326
|
+
this.bookingModeOptions.set(data.options);
|
|
5327
|
+
this.bookingModeLoading.set(false);
|
|
5328
|
+
},
|
|
5329
|
+
error: (err) => {
|
|
5330
|
+
this.bookingModeLoading.set(false);
|
|
5331
|
+
if (!this.bookingModeOptions().length) {
|
|
5332
|
+
this.bookingModeOptions.set([
|
|
5333
|
+
{
|
|
5334
|
+
value: 'confirmed',
|
|
5335
|
+
label: 'Confirm appointment',
|
|
5336
|
+
description: 'Creates a live appointment in the EHR (create-new-appointment). The caller hears that they are booked.',
|
|
5337
|
+
},
|
|
5338
|
+
{
|
|
5339
|
+
value: 'pending',
|
|
5340
|
+
label: 'Pending appointment',
|
|
5341
|
+
description: 'Submits an Online Request for staff review (req-auto-new-appointment). Do not tell the caller the visit is confirmed.',
|
|
5342
|
+
},
|
|
5343
|
+
]);
|
|
5344
|
+
}
|
|
5345
|
+
this.bookingModeError.set(this.asErrorText(err, 'Could not load booking mode for this practice.'));
|
|
5346
|
+
},
|
|
5347
|
+
});
|
|
5348
|
+
}
|
|
5349
|
+
selectBookingMode(mode) {
|
|
5350
|
+
if (this.saving() || this.bookingMode() === mode)
|
|
5351
|
+
return;
|
|
5352
|
+
this.bookingMode.set(mode);
|
|
5353
|
+
this.bookingModeError.set(null);
|
|
5354
|
+
}
|
|
5355
|
+
asErrorText(err, fallback) {
|
|
5356
|
+
if (err instanceof Error && err.message && err.message !== '[object Object]') {
|
|
5357
|
+
return err.message;
|
|
5358
|
+
}
|
|
5359
|
+
if (typeof err === 'string' && err.trim())
|
|
5360
|
+
return err.trim();
|
|
5361
|
+
if (err && typeof err === 'object') {
|
|
5362
|
+
const o = err;
|
|
5363
|
+
const fromMessage = this.coerceUnknownMessage(o.message);
|
|
5364
|
+
if (fromMessage)
|
|
5365
|
+
return fromMessage;
|
|
5366
|
+
const fromError = this.coerceUnknownMessage(o.error);
|
|
5367
|
+
if (fromError)
|
|
5368
|
+
return fromError;
|
|
5369
|
+
}
|
|
5370
|
+
return fallback;
|
|
5371
|
+
}
|
|
5372
|
+
coerceUnknownMessage(value) {
|
|
5373
|
+
if (typeof value === 'string' && value.trim() && value !== '[object Object]') {
|
|
5374
|
+
return value.trim();
|
|
5375
|
+
}
|
|
5376
|
+
if (Array.isArray(value)) {
|
|
5377
|
+
const parts = value
|
|
5378
|
+
.map((item) => this.coerceUnknownMessage(item))
|
|
5379
|
+
.filter((item) => !!item);
|
|
5380
|
+
return parts.length ? parts.join('; ') : null;
|
|
5381
|
+
}
|
|
5382
|
+
if (value && typeof value === 'object' && 'message' in value) {
|
|
5383
|
+
return this.coerceUnknownMessage(value.message);
|
|
5384
|
+
}
|
|
5385
|
+
return null;
|
|
5386
|
+
}
|
|
5202
5387
|
updateField(section, key, value) {
|
|
5203
5388
|
const current = this.settings();
|
|
5204
5389
|
if (!current || isFieldReadOnly(section, key))
|
|
@@ -5417,25 +5602,48 @@ class SettingsPageComponent {
|
|
|
5417
5602
|
payload.transcripts['retainDays'] = Math.max(recDays, txDays);
|
|
5418
5603
|
this.restoreReadOnlyFields(payload, orig);
|
|
5419
5604
|
this.saving.set(true);
|
|
5605
|
+
this.bookingModeError.set(null);
|
|
5606
|
+
const nextBookingMode = this.bookingMode();
|
|
5607
|
+
const bookingModeDirty = this.originalBookingMode != null && nextBookingMode !== this.originalBookingMode;
|
|
5420
5608
|
this.api.putSettings(payload).subscribe({
|
|
5421
5609
|
next: ({ data }) => {
|
|
5422
5610
|
this.originalSettings = structuredClone(data);
|
|
5423
5611
|
this.settings.set(structuredClone(data));
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
this.
|
|
5612
|
+
if (!bookingModeDirty) {
|
|
5613
|
+
this.finishSaveSuccess();
|
|
5614
|
+
return;
|
|
5615
|
+
}
|
|
5616
|
+
this.api.putBookingMode(nextBookingMode).subscribe({
|
|
5617
|
+
next: ({ data: booking }) => {
|
|
5618
|
+
this.bookingMode.set(booking.bookingMode);
|
|
5619
|
+
this.originalBookingMode = booking.bookingMode;
|
|
5620
|
+
if (booking.options?.length)
|
|
5621
|
+
this.bookingModeOptions.set(booking.options);
|
|
5622
|
+
this.finishSaveSuccess();
|
|
5623
|
+
},
|
|
5624
|
+
error: (err) => {
|
|
5625
|
+
this.saving.set(false);
|
|
5626
|
+
const text = this.asErrorText(err, 'Failed to save booking mode');
|
|
5627
|
+
this.bookingModeError.set(text);
|
|
5628
|
+
this.tab.set('phone');
|
|
5629
|
+
this.toast.show(`Agent settings saved, but booking mode failed: ${text}`, 'error');
|
|
5630
|
+
},
|
|
5631
|
+
});
|
|
5429
5632
|
},
|
|
5430
5633
|
error: (err) => {
|
|
5431
5634
|
this.saving.set(false);
|
|
5432
|
-
const message = err
|
|
5433
|
-
? err.message
|
|
5434
|
-
: 'Failed to save agent settings';
|
|
5635
|
+
const message = this.asErrorText(err, 'Failed to save agent settings');
|
|
5435
5636
|
this.toast.show(message, 'error');
|
|
5436
5637
|
},
|
|
5437
5638
|
});
|
|
5438
5639
|
}
|
|
5640
|
+
finishSaveSuccess() {
|
|
5641
|
+
this.saving.set(false);
|
|
5642
|
+
this.saved.set(true);
|
|
5643
|
+
this.toast.show('Agent settings saved', 'success');
|
|
5644
|
+
setTimeout(() => this.saved.set(false), 2000);
|
|
5645
|
+
this.savedSuccessfully.emit();
|
|
5646
|
+
}
|
|
5439
5647
|
restoreReadOnlyFields(payload, orig) {
|
|
5440
5648
|
const editableSections = [
|
|
5441
5649
|
'general',
|
|
@@ -5465,7 +5673,7 @@ class SettingsPageComponent {
|
|
|
5465
5673
|
}
|
|
5466
5674
|
}
|
|
5467
5675
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SettingsPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5468
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SettingsPageComponent, isStandalone: true, selector: "eds-settings-page", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { savedSuccessfully: "savedSuccessfully" }, ngImport: i0, template: "<div\n class=\"settings-page\"\n [class.p-base]=\"presentation() === 'page'\"\n [class.bg-lighter]=\"presentation() === 'page'\"\n [class.min-h-full]=\"presentation() === 'page'\"\n [class.h-full]=\"presentation() === 'page'\"\n [class.min-h-0]=\"presentation() === 'page'\"\n [class.overflow-auto]=\"presentation() === 'page'\"\n [class.flex]=\"presentation() === 'drawer'\"\n [class.h-full]=\"presentation() === 'drawer'\"\n [class.min-h-0]=\"presentation() === 'drawer'\"\n [class.flex-col]=\"presentation() === 'drawer'\"\n>\n @if (presentation() === 'page') {\n <header class=\"mb-6 flex items-start justify-between gap-4\">\n <div>\n <h4>Agent settings</h4>\n <p class=\"mt-2 text-base leading-normal text-zinc-500\">Configure AI receptionist behavior and safety</p>\n </div>\n <div class=\"flex shrink-0 items-center gap-3\">\n @if (saved()) {\n <span class=\"text-sm font-medium text-green-500\">Saved</span>\n }\n <ed-button variant=\"primary\" fill size=\"sm\" [disabled]=\"saving()\" (click$)=\"save()\">\n <ed-icon slot=\"prefix\" name=\"save\" [size]=\"16\" />\n {{ saving() ? 'Saving\u2026' : 'Save changes' }}\n </ed-button>\n </div>\n </header>\n }\n\n @if (loading()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\" aria-busy=\"true\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"presentation\">\n @for (_ of navSkeletonRows; track _) {\n <li class=\"mb-1\">\n <ed-skeleton class=\"h-8 w-full !rounded-md\"></ed-skeleton>\n </li>\n }\n </ul>\n </nav>\n <article class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md overflow-y-auto bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n } @else {\n <div\n class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\"\n aria-busy=\"true\"\n >\n <nav class=\"flex flex-col gap-1 rounded-lg border border-base bg-white p-2 shadow-sm\" aria-label=\"Settings sections\">\n @for (_ of navSkeletonRows; track _) {\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n }\n </nav>\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n }\n } @else if (settings()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"tablist\" aria-label=\"Settings sections\">\n @for (t of tabs; track t.id) {\n <li\n role=\"presentation\"\n [class.cursor-pointer]=\"!isTabDisabled(t.id)\"\n [class.cursor-not-allowed]=\"isTabDisabled(t.id)\"\n >\n <div\n class=\"kpi-menu\"\n role=\"tab\"\n [attr.id]=\"'agent-settings-tab-' + t.id\"\n [attr.aria-selected]=\"tab() === t.id\"\n [attr.aria-disabled]=\"isTabDisabled(t.id)\"\n [attr.tabindex]=\"tab() === t.id ? 0 : -1\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n [class.kpi-menu-active]=\"tab() === t.id\"\n [class.opacity-45]=\"isTabDisabled(t.id)\"\n (click)=\"setTab(t.id)\"\n (keydown.enter)=\"setTab(t.id)\"\n (keydown.space)=\"$event.preventDefault(); setTab(t.id)\"\n >\n <div class=\"flex items-center gap-xs w-full\">\n <span class=\"whitespace-nowrap flex-1 truncate\">{{ t.label }}</span>\n @if (isTabDisabled(t.id)) {\n <span class=\"shrink-0 fs-2xs font-medium uppercase tracking-wide text-lighter\">Off</span>\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </nav>\n\n <article\n class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md bg-white p-base\"\n [class.overflow-y-auto]=\"!locationsMenuOpen()\"\n [class.overflow-visible]=\"locationsMenuOpen()\"\n >\n <header class=\"flex shrink-0 items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n } @else {\n <div class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\">\n <nav\n class=\"sticky top-4 flex max-h-[calc(100vh-120px)] max-[960px]:static max-[960px]:max-h-none max-[960px]:flex-row max-[960px]:flex-wrap flex-col gap-1 overflow-y-auto rounded-lg border border-base bg-white p-2 shadow-sm\"\n aria-label=\"Settings sections\"\n >\n @for (t of tabs; track t.id) {\n <button\n type=\"button\"\n class=\"settings-page__nav-item flex w-full max-[960px]:w-auto max-[960px]:flex-1 cursor-pointer items-center justify-between gap-3 rounded-md border-none bg-transparent px-4 py-3 text-left text-sm font-medium leading-snug text-zinc-600\"\n [class.settings-page__nav-item--active]=\"tab() === t.id\"\n [class.settings-page__nav-item--disabled]=\"isTabDisabled(t.id)\"\n [disabled]=\"isTabDisabled(t.id)\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n (click)=\"setTab(t.id)\"\n >\n {{ t.label }}\n @if (isTabDisabled(t.id)) {\n <span class=\"ml-auto text-xs font-medium uppercase tracking-wide text-zinc-400\">Disabled</span>\n }\n </button>\n }\n </nav>\n\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"flex items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n }\n }\n</div>\n\n<ng-template #settingsPanels>\n @if (tab() === 'knowledge') {\n <div class=\"flex w-full max-w-4xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>What to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatToSay', $event)\"\n placeholder=\"Hours, parking, payment options, arrival instructions, emergencies\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>What not to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatNotToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatNotToSay', $event)\"\n placeholder=\"Clinical advice, unverified prices, PHI, promises the practice cannot keep\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatNotToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n </div>\n } @else if (tab() === 'general') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">\n Name<span required></span>\n </label>\n <ed-icon\n name=\"info\"\n [size]=\"16\"\n class=\"text-light\"\n title=\"How the AI introduces itself on calls\"\n />\n </div>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('general', 'agentName')\"\n (ngModelChange)=\"updateField('general', 'agentName', $event)\"\n autocomplete=\"off\"\n />\n </div>\n\n <div class=\"flex items-end gap-sm\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-xs\">\n <label>Voice<span required></span></label>\n <select\n class=\"form-select is-sm settings-page__select\"\n [ngModel]=\"selectedVoiceId()\"\n (ngModelChange)=\"onVoiceChange($event)\"\n autocomplete=\"off\"\n >\n @for (v of voicePresets; track v.id) {\n <option [ngValue]=\"v.id\">{{ v.gender }} \u00B7 {{ v.label }}</option>\n }\n </select>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__voice-play inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-md border border-base bg-white disabled:cursor-wait disabled:opacity-60\"\n [disabled]=\"!selectedVoiceId() || voicePreviewBusy()\"\n [attr.aria-label]=\"voicePreviewPlaying() ? 'Stop voice preview' : 'Play voice preview'\"\n [title]=\"voicePreviewPlaying() ? 'Stop preview' : 'Play sample'\"\n (click)=\"toggleVoicePreview()\"\n >\n <ed-icon [name]=\"voicePreviewPlaying() ? 'stop' : 'play_arrow'\" [size]=\"20\" />\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Tone</label>\n <div class=\"flex flex-wrap gap-xs\" role=\"radiogroup\" aria-label=\"Tone\">\n @for (tone of toneOptions; track tone.value) {\n <button\n type=\"button\"\n class=\"settings-page__tone cursor-pointer rounded-full border border-transparent bg-lighter px-sm py-2xs fs-xs font-medium text-body\"\n [class.settings-page__tone--active]=\"selectedTone() === tone.value\"\n [class.font-semibold]=\"selectedTone() === tone.value\"\n [attr.aria-checked]=\"selectedTone() === tone.value\"\n role=\"radio\"\n (click)=\"setTone(tone.value)\"\n >\n {{ tone.label }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Inbound Greetings<span required></span></label>\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n spellcheck=\"false\"\n [maxlength]=\"welcomeMax\"\n [placeholder]=\"welcomePlaceholder()\"\n [ngModel]=\"welcomeMessage()\"\n (ngModelChange)=\"updateWelcomeMessage($event)\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ welcomeMessage().length }}/{{ welcomeMax }}</span>\n <div class=\"flex flex-wrap items-center gap-xs\">\n <span class=\"fs-xs font-medium text-dark\">Variables:</span>\n @for (v of greetingVariables; track v.key) {\n <button\n type=\"button\"\n class=\"settings-page__var-chip inline-flex h-5 cursor-pointer items-center rounded border border-base bg-white px-2xs fs-xs font-medium text-dark\"\n (click)=\"insertGreetingVariable(v.token)\"\n [title]=\"'Insert ' + v.token\"\n >\n {{ v.label }}\n </button>\n }\n </div>\n </div>\n </div>\n } @else if (tab() === 'phone') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">AI Answer Mode<span required></span></label>\n <ed-icon name=\"info\" [size]=\"16\" class=\"text-light\" title=\"When the AI picks up inbound calls\" />\n </div>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'answerMode')\"\n (ngModelChange)=\"updateField('phone', 'answerMode', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of answerModeOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>AI Phone Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'mainNumber')\"\n [ngModel]=\"fieldValue('phone', 'mainNumber')\"\n (ngModelChange)=\"updateField('phone', 'mainNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Number patients dial for the AI receptionist. Locked (managed by platform).</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Transfer Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'transferNumber')\"\n [ngModel]=\"fieldValue('phone', 'transferNumber')\"\n (ngModelChange)=\"updateField('phone', 'transferNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Staff / front-desk handoff number. Locked.</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Ringing Time Wait<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'ringTimeout')\"\n (ngModelChange)=\"selectNumberField('phone', 'ringTimeout', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of ringTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"event_available\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Create Follow-up Task</span>\n <span class=\"fs-xs text-light\">\n If no one answers in time, the agent auto-creates a high priority task.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n [attr.aria-pressed]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n aria-label=\"Create Follow-up Task\"\n (click)=\"updateField('phone', 'createFollowUpTask', !fieldValue('phone', 'createFollowUpTask'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Location Handled<span required></span></label>\n <div class=\"relative\" data-locations-dd (document:click)=\"onLocationsDocClick($event)\">\n <div\n class=\"form-input flex h-auto w-full cursor-pointer items-center justify-between gap-xs py-2xs text-left\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.opacity-55]=\"locations().length === 0\"\n [attr.aria-expanded]=\"locationsMenuOpen()\"\n [attr.aria-disabled]=\"locations().length === 0\"\n [attr.title]=\"locationSummary()\"\n aria-haspopup=\"listbox\"\n aria-label=\"Locations handled\"\n (click)=\"$event.stopPropagation(); locations().length && toggleLocationsMenu()\"\n (keydown.enter)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n (keydown.space)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n >\n <span class=\"flex min-w-0 flex-1 flex-wrap items-center gap-2xs overflow-hidden\">\n @if (locations().length === 0) {\n <span class=\"fs-sm text-light\">No locations available.</span>\n } @else if (selectedLocations().length === 0) {\n <span class=\"fs-sm text-light\">Select locations</span>\n } @else {\n @for (loc of visibleSelectedLocations(); track loc.id) {\n <span class=\"inline-flex h-5 items-center gap-2xs rounded bg-primary-50 px-2xs text-primary\">\n <span class=\"fs-xs font-medium\">{{ loc.name }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-3 w-3 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-primary\"\n [attr.aria-label]=\"'Remove ' + loc.name\"\n (click)=\"$event.stopPropagation(); toggleLocation(loc.id)\"\n >\n <ed-icon name=\"close\" [size]=\"12\" color=\"currentColor\" />\n </button>\n </span>\n }\n @if (hiddenLocationCount() > 0) {\n <span class=\"inline-flex h-5 items-center rounded bg-primary-50 px-2xs fs-xs font-medium text-primary\">\n +{{ hiddenLocationCount() }}\n </span>\n }\n }\n </span>\n <ed-icon name=\"expand_more\" [size]=\"16\" class=\"shrink-0 text-light\" />\n </div>\n @if (locationsMenuOpen()) {\n <ul\n class=\"settings-page__locations-menu absolute bottom-full z-50 m-0 mb-1 max-h-56 w-full list-none overflow-auto rounded-md border border-zinc-300 bg-white p-2xs shadow-lg\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n >\n @for (loc of locations(); track loc.id) {\n <li role=\"option\" [attr.aria-selected]=\"selectedLocationIds().includes(loc.id)\">\n <label class=\"flex cursor-pointer items-center gap-xs rounded px-xs py-2xs fs-sm text-dark hover:bg-lighter\">\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 accent-blue-600\"\n [checked]=\"selectedLocationIds().includes(loc.id)\"\n (change)=\"toggleLocation(loc.id)\"\n />\n <span class=\"min-w-0 truncate\">{{ loc.name }}</span>\n </label>\n </li>\n }\n </ul>\n }\n </div>\n @if (locations().length === 0) {\n <p class=\"m-0 fs-sm text-light\">No locations available.</p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Max AI Call Duration<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'maxCallDurationMin')\"\n (ngModelChange)=\"selectNumberField('phone', 'maxCallDurationMin', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of maxCallDurationOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Silence Timeout<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'silenceTimeoutSec')\"\n (ngModelChange)=\"selectNumberField('phone', 'silenceTimeoutSec', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of silenceTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>After-Hours Behaviour<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'afterHoursBehavior')\"\n (ngModelChange)=\"updateField('phone', 'afterHoursBehavior', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of afterHoursOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-md border-t border-light pt-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Minimum lead time (hours)</label>\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n min=\"0\"\n [ngModel]=\"fieldValue('scheduling', 'leadTimeHours')\"\n (ngModelChange)=\"updateField('scheduling', 'leadTimeHours', +$event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Earliest bookable slot from now.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"calendar_month\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Allow same-day booking</span>\n <span class=\"fs-xs text-light\">\n Let patients book appointments later today.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n [attr.aria-pressed]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n aria-label=\"Allow same-day booking\"\n (click)=\"updateField('scheduling', 'allowSameDay', !fieldValue('scheduling', 'allowSameDay'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n </div>\n } @else if (tab() === 'transcripts') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Call Recordings<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'recordingRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'recordingRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Transcripts<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'transcriptRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'transcriptRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"m-0\">Disclosure Warning</label>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"disclosureEnabled()\"\n [attr.aria-pressed]=\"disclosureEnabled()\"\n aria-label=\"Disclosure Warning\"\n (click)=\"setDisclosureEnabled(!disclosureEnabled())\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n @if (disclosureEnabled()) {\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n [maxlength]=\"disclosureMax\"\n [ngModel]=\"disclosureText()\"\n (ngModelChange)=\"updateDisclosureText($event)\"\n autocomplete=\"off\"\n ></textarea>\n }\n </div>\n </div>\n } @else if (tab() === 'advanced') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary-50 text-primary\" aria-hidden=\"true\">\n <ed-icon name=\"sparkle\" [size]=\"20\" />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">\n @if (toggling()) {\n Updating\u2026\n } @else if (online() === true) {\n Agent online\n } @else if (online() === false) {\n Agent offline\n } @else {\n Status unknown\n }\n </span>\n <span class=\"fs-xs text-light\">\n @if (online() === true) {\n AI receptionist is answering inbound calls.\n } @else if (online() === false) {\n AI is offline \u2014 calls go to the front desk.\n } @else {\n Checking agent status\u2026\n }\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"online() === true\"\n [disabled]=\"agentSwitchDisabled()\"\n [attr.aria-pressed]=\"online() === true\"\n aria-label=\"Agent online\"\n (click)=\"onAgentToggleClick()\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Model version</label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('advanced', 'modelVersion')\"\n disabled\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Set by Edvak support.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-lighter px-base py-sm opacity-90\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Debug mode</span>\n <span class=\"fs-xs text-light\">Verbose logging \u2014 contact Edvak to change.</span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('advanced', 'debugMode')\"\n disabled\n [attr.aria-pressed]=\"!!fieldValue('advanced', 'debugMode')\"\n aria-label=\"Debug mode\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n } @else {\n <div class=\"grid grid-cols-2 gap-x-md gap-y-md below-md:grid-cols-1\">\n @for (field of fieldsForTab(); track field.key) {\n @if (field.type === 'boolean') {\n <label\n class=\"col-span-full flex cursor-pointer items-center justify-between gap-base rounded-md border border-base bg-lighter px-base py-sm\"\n [class.cursor-default]=\"fieldIsReadOnly(tab(), field.key)\"\n [class.opacity-90]=\"fieldIsReadOnly(tab(), field.key)\"\n >\n <div class=\"flex min-w-0 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">{{ field.label }}</span>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n </div>\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 shrink-0 accent-blue-600 disabled:cursor-not-allowed\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n </label>\n } @else if (field.type === 'select' && field.options?.length) {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n <select\n class=\"form-select is-sm\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n >\n @for (opt of field.options; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n } @else {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n @if (field.type === 'number') {\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, +$event)\"\n autocomplete=\"off\"\n />\n } @else {\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n }\n </div>\n }\n }\n </div>\n }\n</ng-template>\n\n<eds-knowledge-test-modal\n [open]=\"knowledgeTestOpen()\"\n [whatToSay]=\"whatToSay()\"\n [whatNotToSay]=\"whatNotToSay()\"\n [voiceId]=\"selectedVoiceId()\"\n (closed)=\"closeTestCall()\"\n/>\n\n@if (confirmOffOpen()) {\n <app-modal\n title=\"Turn off AI receptionist?\"\n subtitle=\"Inbound callers will be transferred to the front desk instead of the AI.\"\n maxWidth=\"480px\"\n (closed)=\"cancelConfirmOff()\"\n >\n <p class=\"mb-4 m-0 text-sm leading-normal text-zinc-500\">While offline, the AI will not answer calls. Callers are routed to the human receptionist.</p>\n <div class=\"flex justify-end gap-2\">\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"cancelConfirmOff()\">Cancel</ed-button>\n <ed-button variant=\"danger\" fill size=\"sm\" [disabled]=\"toggling()\" (click$)=\"confirmTurnOff()\">\n Turn off AI receptionist\n </ed-button>\n </div>\n </app-modal>\n}\n", styles: [":host{display:block}.settings-page__layout{grid-template-columns:240px minmax(0,1fr)}.settings-page__nav-item:hover{background:var(--eds-surface-l1, #f7f9fa);color:var(--eds-text-primary, #41464c)}.settings-page__nav-item--active{background:var(--eds-color-primary-light, #eaf1fe);color:var(--eds-text-brand, #2162f0)}.settings-page__nav-item--disabled,.settings-page__nav-item:disabled{opacity:.45;cursor:not-allowed;color:var(--eds-text-tertiary, #767676)}.settings-page__nav-item--disabled:hover,.settings-page__nav-item:disabled:hover{background:none;color:var(--eds-text-tertiary, #767676)}.settings-page__select{min-height:2.25rem;background:#fff;border:1px solid #c5c7d0;color:#1f2328}.settings-page__locations-menu{box-shadow:0 8px 24px #0f172a29}.settings-page__voice-play{color:var(--eds-text-primary, #41464c)}.settings-page__voice-play:hover:not(:disabled){border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__tone--active{background:var(--eds-surface-l0, #fff);border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__var-chip:hover{border-color:var(--eds-brand-300, #94c5f9);color:var(--eds-brand-600, #2162f0)}.settings-page__switch{width:44px;height:26px;border-radius:999px;border:none;background:var(--eds-gray-300, #cbd5e1);padding:3px;cursor:pointer;transition:background .15s ease}.settings-page__switch--on{background:var(--eds-brand-600, #2162f0)}.settings-page__switch:disabled{opacity:.55;cursor:not-allowed}.settings-page__switch-thumb{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a33;transition:transform .15s ease}.settings-page__switch--on .settings-page__switch-thumb{transform:translate(18px)}.form-input:disabled,.form-select:disabled{color:var(--eds-color-text-muted, #64748b);background:var(--eds-color-surface-alt, #f1f5f9);border-color:var(--eds-color-border, #e2e8f0);cursor:not-allowed;opacity:1}@media(max-width:960px){.settings-page__layout{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.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: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ed-icon", inputs: ["name", "size", "color", "cssClass", "decorative", "ariaHidden", "ariaLabel", "title", "desc", "focusable", "tabIndex"] }, { kind: "component", type: EdButtonComponent, selector: "ed-button", inputs: ["variant", "size", "disabled", "ghost", "outline", "subtle", "fill", "loading", "block", "elevated", "shape", "type", "href", "routerLink", "rel", "target", "download", "ariaLabel"], outputs: ["click$"] }, { kind: "component", type: KnowledgeTestModalComponent, selector: "eds-knowledge-test-modal", inputs: ["open", "whatToSay", "whatNotToSay", "voiceId"], outputs: ["closed"] }, { kind: "component", type: ModalComponent, selector: "app-modal", inputs: ["title", "subtitle", "maxWidth"], outputs: ["closed"] }, { kind: "component", type: EdSkeletonComponent, selector: "ed-skeleton", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5676
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SettingsPageComponent, isStandalone: true, selector: "eds-settings-page", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { savedSuccessfully: "savedSuccessfully" }, host: { properties: { "class.settings-page-host--drawer": "presentation() === \"drawer\"" } }, ngImport: i0, template: "<div\n class=\"settings-page\"\n [class.p-base]=\"presentation() === 'page'\"\n [class.bg-lighter]=\"presentation() === 'page'\"\n [class.min-h-full]=\"presentation() === 'page'\"\n [class.h-full]=\"presentation() === 'page'\"\n [class.min-h-0]=\"presentation() === 'page'\"\n [class.overflow-auto]=\"presentation() === 'page'\"\n [class.flex]=\"presentation() === 'drawer'\"\n [class.h-full]=\"presentation() === 'drawer'\"\n [class.min-h-0]=\"presentation() === 'drawer'\"\n [class.flex-col]=\"presentation() === 'drawer'\"\n>\n @if (presentation() === 'page') {\n <header class=\"mb-6 flex items-start justify-between gap-4\">\n <div>\n <h4>Agent settings</h4>\n <p class=\"mt-2 text-base leading-normal text-zinc-500\">Configure AI receptionist behavior and safety</p>\n </div>\n <div class=\"flex shrink-0 items-center gap-3\">\n @if (saved()) {\n <span class=\"text-sm font-medium text-green-500\">Saved</span>\n }\n <ed-button variant=\"primary\" fill size=\"sm\" [disabled]=\"saving()\" (click$)=\"save()\">\n <ed-icon slot=\"prefix\" name=\"save\" [size]=\"16\" />\n {{ saving() ? 'Saving\u2026' : 'Save changes' }}\n </ed-button>\n </div>\n </header>\n }\n\n @if (loading()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\" aria-busy=\"true\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"presentation\">\n @for (_ of navSkeletonRows; track _) {\n <li class=\"mb-1\">\n <ed-skeleton class=\"h-8 w-full !rounded-md\"></ed-skeleton>\n </li>\n }\n </ul>\n </nav>\n <article class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md overflow-y-auto bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n } @else {\n <div\n class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\"\n aria-busy=\"true\"\n >\n <nav class=\"flex flex-col gap-1 rounded-lg border border-base bg-white p-2 shadow-sm\" aria-label=\"Settings sections\">\n @for (_ of navSkeletonRows; track _) {\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n }\n </nav>\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n }\n } @else if (settings()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"tablist\" aria-label=\"Settings sections\">\n @for (t of tabs; track t.id) {\n <li\n role=\"presentation\"\n [class.cursor-pointer]=\"!isTabDisabled(t.id)\"\n [class.cursor-not-allowed]=\"isTabDisabled(t.id)\"\n >\n <div\n class=\"kpi-menu\"\n role=\"tab\"\n [attr.id]=\"'agent-settings-tab-' + t.id\"\n [attr.aria-selected]=\"tab() === t.id\"\n [attr.aria-disabled]=\"isTabDisabled(t.id)\"\n [attr.tabindex]=\"tab() === t.id ? 0 : -1\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n [class.kpi-menu-active]=\"tab() === t.id\"\n [class.opacity-45]=\"isTabDisabled(t.id)\"\n (click)=\"setTab(t.id)\"\n (keydown.enter)=\"setTab(t.id)\"\n (keydown.space)=\"$event.preventDefault(); setTab(t.id)\"\n >\n <div class=\"flex items-center gap-xs w-full\">\n <span class=\"whitespace-nowrap flex-1 truncate\">{{ t.label }}</span>\n @if (isTabDisabled(t.id)) {\n <span class=\"shrink-0 fs-2xs font-medium uppercase tracking-wide text-lighter\">Off</span>\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </nav>\n\n <article\n class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md bg-white p-base\"\n [class.overflow-y-auto]=\"!locationsMenuOpen()\"\n [class.overflow-visible]=\"locationsMenuOpen()\"\n >\n <header class=\"flex shrink-0 items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n } @else {\n <div class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\">\n <nav\n class=\"sticky top-4 flex max-h-[calc(100vh-120px)] max-[960px]:static max-[960px]:max-h-none max-[960px]:flex-row max-[960px]:flex-wrap flex-col gap-1 overflow-y-auto rounded-lg border border-base bg-white p-2 shadow-sm\"\n aria-label=\"Settings sections\"\n >\n @for (t of tabs; track t.id) {\n <button\n type=\"button\"\n class=\"settings-page__nav-item flex w-full max-[960px]:w-auto max-[960px]:flex-1 cursor-pointer items-center justify-between gap-3 rounded-md border-none bg-transparent px-4 py-3 text-left text-sm font-medium leading-snug text-zinc-600\"\n [class.settings-page__nav-item--active]=\"tab() === t.id\"\n [class.settings-page__nav-item--disabled]=\"isTabDisabled(t.id)\"\n [disabled]=\"isTabDisabled(t.id)\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n (click)=\"setTab(t.id)\"\n >\n {{ t.label }}\n @if (isTabDisabled(t.id)) {\n <span class=\"ml-auto text-xs font-medium uppercase tracking-wide text-zinc-400\">Disabled</span>\n }\n </button>\n }\n </nav>\n\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"flex items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n }\n }\n</div>\n\n<ng-template #settingsPanels>\n @if (tab() === 'knowledge') {\n <div class=\"flex w-full max-w-4xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>What to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatToSay', $event)\"\n placeholder=\"Hours, parking, payment options, arrival instructions, emergencies\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>What not to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatNotToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatNotToSay', $event)\"\n placeholder=\"Clinical advice, unverified prices, PHI, promises the practice cannot keep\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatNotToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n </div>\n } @else if (tab() === 'general') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">\n Name<span required></span>\n </label>\n <ed-icon\n name=\"info\"\n [size]=\"16\"\n class=\"text-light\"\n title=\"How the AI introduces itself on calls\"\n />\n </div>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('general', 'agentName')\"\n (ngModelChange)=\"updateField('general', 'agentName', $event)\"\n autocomplete=\"off\"\n />\n </div>\n\n <div class=\"flex items-end gap-sm\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-xs\">\n <label>Voice<span required></span></label>\n <select\n class=\"form-select is-sm settings-page__select\"\n [ngModel]=\"selectedVoiceId()\"\n (ngModelChange)=\"onVoiceChange($event)\"\n autocomplete=\"off\"\n >\n @for (v of voicePresets; track v.id) {\n <option [ngValue]=\"v.id\">{{ v.gender }} \u00B7 {{ v.label }}</option>\n }\n </select>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__voice-play inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-md border border-base bg-white disabled:cursor-wait disabled:opacity-60\"\n [disabled]=\"!selectedVoiceId() || voicePreviewBusy()\"\n [attr.aria-label]=\"voicePreviewPlaying() ? 'Stop voice preview' : 'Play voice preview'\"\n [title]=\"voicePreviewPlaying() ? 'Stop preview' : 'Play sample'\"\n (click)=\"toggleVoicePreview()\"\n >\n <ed-icon [name]=\"voicePreviewPlaying() ? 'stop' : 'play_arrow'\" [size]=\"20\" />\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Tone</label>\n <div class=\"flex flex-wrap gap-xs\" role=\"radiogroup\" aria-label=\"Tone\">\n @for (tone of toneOptions; track tone.value) {\n <button\n type=\"button\"\n class=\"settings-page__tone cursor-pointer rounded-full border border-transparent bg-lighter px-sm py-2xs fs-xs font-medium text-body\"\n [class.settings-page__tone--active]=\"selectedTone() === tone.value\"\n [class.font-semibold]=\"selectedTone() === tone.value\"\n [attr.aria-checked]=\"selectedTone() === tone.value\"\n role=\"radio\"\n (click)=\"setTone(tone.value)\"\n >\n {{ tone.label }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Inbound Greetings<span required></span></label>\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n spellcheck=\"false\"\n [maxlength]=\"welcomeMax\"\n [placeholder]=\"welcomePlaceholder()\"\n [ngModel]=\"welcomeMessage()\"\n (ngModelChange)=\"updateWelcomeMessage($event)\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ welcomeMessage().length }}/{{ welcomeMax }}</span>\n <div class=\"flex flex-wrap items-center gap-xs\">\n <span class=\"fs-xs font-medium text-dark\">Variables:</span>\n @for (v of greetingVariables; track v.key) {\n <button\n type=\"button\"\n class=\"settings-page__var-chip inline-flex h-5 cursor-pointer items-center rounded border border-base bg-white px-2xs fs-xs font-medium text-dark\"\n (click)=\"insertGreetingVariable(v.token)\"\n [title]=\"'Insert ' + v.token\"\n >\n {{ v.label }}\n </button>\n }\n </div>\n </div>\n </div>\n } @else if (tab() === 'phone') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">AI Answer Mode<span required></span></label>\n <ed-icon name=\"info\" [size]=\"16\" class=\"text-light\" title=\"When the AI picks up inbound calls\" />\n </div>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'answerMode')\"\n (ngModelChange)=\"updateField('phone', 'answerMode', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of answerModeOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>AI Phone Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'mainNumber')\"\n [ngModel]=\"fieldValue('phone', 'mainNumber')\"\n (ngModelChange)=\"updateField('phone', 'mainNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Number patients dial for the AI receptionist. Locked (managed by platform).</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Transfer Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'transferNumber')\"\n [ngModel]=\"fieldValue('phone', 'transferNumber')\"\n (ngModelChange)=\"updateField('phone', 'transferNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Staff / front-desk handoff number. Locked.</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Ringing Time Wait<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'ringTimeout')\"\n (ngModelChange)=\"selectNumberField('phone', 'ringTimeout', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of ringTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"event_available\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Create Follow-up Task</span>\n <span class=\"fs-xs text-light\">\n If no one answers in time, the agent auto-creates a high priority task.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n [attr.aria-pressed]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n aria-label=\"Create Follow-up Task\"\n (click)=\"updateField('phone', 'createFollowUpTask', !fieldValue('phone', 'createFollowUpTask'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Location Handled<span required></span></label>\n <div class=\"relative\" data-locations-dd (document:click)=\"onLocationsDocClick($event)\">\n <div\n class=\"form-input flex h-auto w-full cursor-pointer items-center justify-between gap-xs py-2xs text-left\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.opacity-55]=\"locations().length === 0\"\n [attr.aria-expanded]=\"locationsMenuOpen()\"\n [attr.aria-disabled]=\"locations().length === 0\"\n [attr.title]=\"locationSummary()\"\n aria-haspopup=\"listbox\"\n aria-label=\"Locations handled\"\n (click)=\"$event.stopPropagation(); locations().length && toggleLocationsMenu()\"\n (keydown.enter)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n (keydown.space)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n >\n <span class=\"flex min-w-0 flex-1 flex-wrap items-center gap-2xs overflow-hidden\">\n @if (locations().length === 0) {\n <span class=\"fs-sm text-light\">No locations available.</span>\n } @else if (selectedLocations().length === 0) {\n <span class=\"fs-sm text-light\">Select locations</span>\n } @else {\n @for (loc of visibleSelectedLocations(); track loc.id) {\n <span class=\"inline-flex h-5 items-center gap-2xs rounded bg-primary-50 px-2xs text-primary\">\n <span class=\"fs-xs font-medium\">{{ loc.name }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-3 w-3 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-primary\"\n [attr.aria-label]=\"'Remove ' + loc.name\"\n (click)=\"$event.stopPropagation(); toggleLocation(loc.id)\"\n >\n <ed-icon name=\"close\" [size]=\"12\" color=\"currentColor\" />\n </button>\n </span>\n }\n @if (hiddenLocationCount() > 0) {\n <span class=\"inline-flex h-5 items-center rounded bg-primary-50 px-2xs fs-xs font-medium text-primary\">\n +{{ hiddenLocationCount() }}\n </span>\n }\n }\n </span>\n <ed-icon name=\"expand_more\" [size]=\"16\" class=\"shrink-0 text-light\" />\n </div>\n @if (locationsMenuOpen()) {\n <ul\n class=\"settings-page__locations-menu absolute bottom-full z-50 m-0 mb-1 max-h-56 w-full list-none overflow-auto rounded-md border border-zinc-300 bg-white p-2xs shadow-lg\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n >\n @for (loc of locations(); track loc.id) {\n <li role=\"option\" [attr.aria-selected]=\"selectedLocationIds().includes(loc.id)\">\n <label class=\"flex cursor-pointer items-center gap-xs rounded px-xs py-2xs fs-sm text-dark hover:bg-lighter\">\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 accent-blue-600\"\n [checked]=\"selectedLocationIds().includes(loc.id)\"\n (change)=\"toggleLocation(loc.id)\"\n />\n <span class=\"min-w-0 truncate\">{{ loc.name }}</span>\n </label>\n </li>\n }\n </ul>\n }\n </div>\n @if (locations().length === 0) {\n <p class=\"m-0 fs-sm text-light\">No locations available.</p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Max AI Call Duration<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'maxCallDurationMin')\"\n (ngModelChange)=\"selectNumberField('phone', 'maxCallDurationMin', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of maxCallDurationOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Silence Timeout<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'silenceTimeoutSec')\"\n (ngModelChange)=\"selectNumberField('phone', 'silenceTimeoutSec', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of silenceTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>After-Hours Behaviour<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'afterHoursBehavior')\"\n (ngModelChange)=\"updateField('phone', 'afterHoursBehavior', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of afterHoursOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-md border-t border-light pt-md\">\n <div class=\"settings-page__booking-mode flex flex-col gap-sm\">\n <div class=\"flex flex-col gap-2xs\">\n <span class=\"fs-sm font-medium text-dark\">Appointment booking mode</span>\n <span class=\"fs-xs text-light\">\n Controls how the voice agent writes bookings to the EHR for this practice.\n Applied when you click Save changes.\n </span>\n </div>\n\n @if (bookingModeLoading()) {\n <p class=\"m-0 fs-sm text-light\">Loading booking mode\u2026</p>\n } @else {\n <div class=\"flex flex-col gap-xs\" role=\"radiogroup\" aria-label=\"Appointment booking mode\">\n @for (opt of bookingModeOptions(); track opt.value) {\n <button\n type=\"button\"\n class=\"settings-page__booking-option flex w-full cursor-pointer items-start gap-sm rounded-md border border-base bg-white p-sm text-left\"\n [class.settings-page__booking-option--active]=\"bookingMode() === opt.value\"\n [disabled]=\"saving()\"\n role=\"radio\"\n [attr.aria-checked]=\"bookingMode() === opt.value\"\n (click)=\"selectBookingMode(opt.value)\"\n >\n <span\n class=\"settings-page__booking-radio mt-2xs flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-zinc-300\"\n [class.settings-page__booking-radio--on]=\"bookingMode() === opt.value\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm font-medium text-dark\">{{ opt.label }}</span>\n @if (opt.description) {\n <span class=\"fs-xs text-light\">{{ opt.description }}</span>\n }\n </span>\n </button>\n }\n </div>\n }\n\n @if (bookingModeError(); as err) {\n <p class=\"m-0 rounded-md border border-red-200 bg-red-50 px-sm py-xs fs-sm text-red-600\" role=\"alert\">\n {{ err }}\n </p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Minimum lead time (hours)</label>\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n min=\"0\"\n [ngModel]=\"fieldValue('scheduling', 'leadTimeHours')\"\n (ngModelChange)=\"updateField('scheduling', 'leadTimeHours', +$event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Earliest bookable slot from now.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"calendar_month\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Allow same-day booking</span>\n <span class=\"fs-xs text-light\">\n Let patients book appointments later today.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n [attr.aria-pressed]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n aria-label=\"Allow same-day booking\"\n (click)=\"updateField('scheduling', 'allowSameDay', !fieldValue('scheduling', 'allowSameDay'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n </div>\n } @else if (tab() === 'transcripts') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Call Recordings<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'recordingRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'recordingRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Transcripts<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'transcriptRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'transcriptRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"m-0\">Disclosure Warning</label>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"disclosureEnabled()\"\n [attr.aria-pressed]=\"disclosureEnabled()\"\n aria-label=\"Disclosure Warning\"\n (click)=\"setDisclosureEnabled(!disclosureEnabled())\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n @if (disclosureEnabled()) {\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n [maxlength]=\"disclosureMax\"\n [ngModel]=\"disclosureText()\"\n (ngModelChange)=\"updateDisclosureText($event)\"\n autocomplete=\"off\"\n ></textarea>\n }\n </div>\n </div>\n } @else if (tab() === 'advanced') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary-50 text-primary\" aria-hidden=\"true\">\n <ed-icon name=\"sparkle\" [size]=\"20\" />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">\n @if (toggling()) {\n Updating\u2026\n } @else if (online() === true) {\n Agent online\n } @else if (online() === false) {\n Agent offline\n } @else {\n Status unknown\n }\n </span>\n <span class=\"fs-xs text-light\">\n @if (online() === true) {\n AI receptionist is answering inbound calls.\n } @else if (online() === false) {\n AI is offline \u2014 calls go to the front desk.\n } @else {\n Checking agent status\u2026\n }\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"online() === true\"\n [disabled]=\"agentSwitchDisabled()\"\n [attr.aria-pressed]=\"online() === true\"\n aria-label=\"Agent online\"\n (click)=\"onAgentToggleClick()\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Model version</label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('advanced', 'modelVersion')\"\n disabled\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Set by Edvak support.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-lighter px-base py-sm opacity-90\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Debug mode</span>\n <span class=\"fs-xs text-light\">Verbose logging \u2014 contact Edvak to change.</span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('advanced', 'debugMode')\"\n disabled\n [attr.aria-pressed]=\"!!fieldValue('advanced', 'debugMode')\"\n aria-label=\"Debug mode\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n } @else {\n <div class=\"grid grid-cols-2 gap-x-md gap-y-md below-md:grid-cols-1\">\n @for (field of fieldsForTab(); track field.key) {\n @if (field.type === 'boolean') {\n <label\n class=\"col-span-full flex cursor-pointer items-center justify-between gap-base rounded-md border border-base bg-lighter px-base py-sm\"\n [class.cursor-default]=\"fieldIsReadOnly(tab(), field.key)\"\n [class.opacity-90]=\"fieldIsReadOnly(tab(), field.key)\"\n >\n <div class=\"flex min-w-0 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">{{ field.label }}</span>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n </div>\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 shrink-0 accent-blue-600 disabled:cursor-not-allowed\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n </label>\n } @else if (field.type === 'select' && field.options?.length) {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n <select\n class=\"form-select is-sm\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n >\n @for (opt of field.options; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n } @else {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n @if (field.type === 'number') {\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, +$event)\"\n autocomplete=\"off\"\n />\n } @else {\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n }\n </div>\n }\n }\n </div>\n }\n</ng-template>\n\n<eds-knowledge-test-modal\n [open]=\"knowledgeTestOpen()\"\n [whatToSay]=\"whatToSay()\"\n [whatNotToSay]=\"whatNotToSay()\"\n [voiceId]=\"selectedVoiceId()\"\n (closed)=\"closeTestCall()\"\n/>\n\n@if (confirmOffOpen()) {\n <app-modal\n title=\"Turn off AI receptionist?\"\n subtitle=\"Inbound callers will be transferred to the front desk instead of the AI.\"\n maxWidth=\"480px\"\n (closed)=\"cancelConfirmOff()\"\n >\n <p class=\"mb-4 m-0 text-sm leading-normal text-zinc-500\">While offline, the AI will not answer calls. Callers are routed to the human receptionist.</p>\n <div class=\"flex justify-end gap-2\">\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"cancelConfirmOff()\">Cancel</ed-button>\n <ed-button variant=\"danger\" fill size=\"sm\" [disabled]=\"toggling()\" (click$)=\"confirmTurnOff()\">\n Turn off AI receptionist\n </ed-button>\n </div>\n </app-modal>\n}\n", styles: [":host{display:block}:host.settings-page-host--drawer{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.settings-page__layout{grid-template-columns:240px minmax(0,1fr)}.settings-page__nav-item:hover{background:var(--eds-surface-l1, #f7f9fa);color:var(--eds-text-primary, #41464c)}.settings-page__nav-item--active{background:var(--eds-color-primary-light, #eaf1fe);color:var(--eds-text-brand, #2162f0)}.settings-page__nav-item--disabled,.settings-page__nav-item:disabled{opacity:.45;cursor:not-allowed;color:var(--eds-text-tertiary, #767676)}.settings-page__nav-item--disabled:hover,.settings-page__nav-item:disabled:hover{background:none;color:var(--eds-text-tertiary, #767676)}.settings-page__select{min-height:2.25rem;background:#fff;border:1px solid #c5c7d0;color:#1f2328}.settings-page__locations-menu{box-shadow:0 8px 24px #0f172a29}.settings-page__voice-play{color:var(--eds-text-primary, #41464c)}.settings-page__voice-play:hover:not(:disabled){border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__tone--active{background:var(--eds-surface-l0, #fff);border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__var-chip:hover{border-color:var(--eds-brand-300, #94c5f9);color:var(--eds-brand-600, #2162f0)}.settings-page__switch{width:44px;height:26px;border-radius:999px;border:none;background:var(--eds-gray-300, #cbd5e1);padding:3px;cursor:pointer;transition:background .15s ease}.settings-page__switch--on{background:var(--eds-brand-600, #2162f0)}.settings-page__switch:disabled{opacity:.55;cursor:not-allowed}.settings-page__switch-thumb{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a33;transition:transform .15s ease}.settings-page__switch--on .settings-page__switch-thumb{transform:translate(18px)}.settings-page__booking-option:hover:not(:disabled){border-color:#94c5f9;background:#f8fbff}.settings-page__booking-option--active{border-color:var(--eds-brand-600, #2162f0);background:var(--eds-color-primary-light, #eaf1fe)}.settings-page__booking-option:disabled{opacity:.7;cursor:wait}.settings-page__booking-radio--on{border-color:var(--eds-brand-600, #2162f0);background:var(--eds-brand-600, #2162f0);box-shadow:inset 0 0 0 3px #fff}.form-input:disabled,.form-select:disabled{color:var(--eds-color-text-muted, #64748b);background:var(--eds-color-surface-alt, #f1f5f9);border-color:var(--eds-color-border, #e2e8f0);cursor:not-allowed;opacity:1}@media(max-width:960px){.settings-page__layout{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.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: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ed-icon", inputs: ["name", "size", "color", "cssClass", "decorative", "ariaHidden", "ariaLabel", "title", "desc", "focusable", "tabIndex"] }, { kind: "component", type: EdButtonComponent, selector: "ed-button", inputs: ["variant", "size", "disabled", "ghost", "outline", "subtle", "fill", "loading", "block", "elevated", "shape", "type", "href", "routerLink", "rel", "target", "download", "ariaLabel"], outputs: ["click$"] }, { kind: "component", type: KnowledgeTestModalComponent, selector: "eds-knowledge-test-modal", inputs: ["open", "whatToSay", "whatNotToSay", "voiceId"], outputs: ["closed"] }, { kind: "component", type: ModalComponent, selector: "app-modal", inputs: ["title", "subtitle", "maxWidth"], outputs: ["closed"] }, { kind: "component", type: EdSkeletonComponent, selector: "ed-skeleton", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5469
5677
|
}
|
|
5470
5678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SettingsPageComponent, decorators: [{
|
|
5471
5679
|
type: Component,
|
|
@@ -5477,7 +5685,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
5477
5685
|
KnowledgeTestModalComponent,
|
|
5478
5686
|
ModalComponent,
|
|
5479
5687
|
EdSkeletonComponent,
|
|
5480
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"settings-page\"\n [class.p-base]=\"presentation() === 'page'\"\n [class.bg-lighter]=\"presentation() === 'page'\"\n [class.min-h-full]=\"presentation() === 'page'\"\n [class.h-full]=\"presentation() === 'page'\"\n [class.min-h-0]=\"presentation() === 'page'\"\n [class.overflow-auto]=\"presentation() === 'page'\"\n [class.flex]=\"presentation() === 'drawer'\"\n [class.h-full]=\"presentation() === 'drawer'\"\n [class.min-h-0]=\"presentation() === 'drawer'\"\n [class.flex-col]=\"presentation() === 'drawer'\"\n>\n @if (presentation() === 'page') {\n <header class=\"mb-6 flex items-start justify-between gap-4\">\n <div>\n <h4>Agent settings</h4>\n <p class=\"mt-2 text-base leading-normal text-zinc-500\">Configure AI receptionist behavior and safety</p>\n </div>\n <div class=\"flex shrink-0 items-center gap-3\">\n @if (saved()) {\n <span class=\"text-sm font-medium text-green-500\">Saved</span>\n }\n <ed-button variant=\"primary\" fill size=\"sm\" [disabled]=\"saving()\" (click$)=\"save()\">\n <ed-icon slot=\"prefix\" name=\"save\" [size]=\"16\" />\n {{ saving() ? 'Saving\u2026' : 'Save changes' }}\n </ed-button>\n </div>\n </header>\n }\n\n @if (loading()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\" aria-busy=\"true\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"presentation\">\n @for (_ of navSkeletonRows; track _) {\n <li class=\"mb-1\">\n <ed-skeleton class=\"h-8 w-full !rounded-md\"></ed-skeleton>\n </li>\n }\n </ul>\n </nav>\n <article class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md overflow-y-auto bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n } @else {\n <div\n class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\"\n aria-busy=\"true\"\n >\n <nav class=\"flex flex-col gap-1 rounded-lg border border-base bg-white p-2 shadow-sm\" aria-label=\"Settings sections\">\n @for (_ of navSkeletonRows; track _) {\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n }\n </nav>\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n }\n } @else if (settings()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"tablist\" aria-label=\"Settings sections\">\n @for (t of tabs; track t.id) {\n <li\n role=\"presentation\"\n [class.cursor-pointer]=\"!isTabDisabled(t.id)\"\n [class.cursor-not-allowed]=\"isTabDisabled(t.id)\"\n >\n <div\n class=\"kpi-menu\"\n role=\"tab\"\n [attr.id]=\"'agent-settings-tab-' + t.id\"\n [attr.aria-selected]=\"tab() === t.id\"\n [attr.aria-disabled]=\"isTabDisabled(t.id)\"\n [attr.tabindex]=\"tab() === t.id ? 0 : -1\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n [class.kpi-menu-active]=\"tab() === t.id\"\n [class.opacity-45]=\"isTabDisabled(t.id)\"\n (click)=\"setTab(t.id)\"\n (keydown.enter)=\"setTab(t.id)\"\n (keydown.space)=\"$event.preventDefault(); setTab(t.id)\"\n >\n <div class=\"flex items-center gap-xs w-full\">\n <span class=\"whitespace-nowrap flex-1 truncate\">{{ t.label }}</span>\n @if (isTabDisabled(t.id)) {\n <span class=\"shrink-0 fs-2xs font-medium uppercase tracking-wide text-lighter\">Off</span>\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </nav>\n\n <article\n class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md bg-white p-base\"\n [class.overflow-y-auto]=\"!locationsMenuOpen()\"\n [class.overflow-visible]=\"locationsMenuOpen()\"\n >\n <header class=\"flex shrink-0 items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n } @else {\n <div class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\">\n <nav\n class=\"sticky top-4 flex max-h-[calc(100vh-120px)] max-[960px]:static max-[960px]:max-h-none max-[960px]:flex-row max-[960px]:flex-wrap flex-col gap-1 overflow-y-auto rounded-lg border border-base bg-white p-2 shadow-sm\"\n aria-label=\"Settings sections\"\n >\n @for (t of tabs; track t.id) {\n <button\n type=\"button\"\n class=\"settings-page__nav-item flex w-full max-[960px]:w-auto max-[960px]:flex-1 cursor-pointer items-center justify-between gap-3 rounded-md border-none bg-transparent px-4 py-3 text-left text-sm font-medium leading-snug text-zinc-600\"\n [class.settings-page__nav-item--active]=\"tab() === t.id\"\n [class.settings-page__nav-item--disabled]=\"isTabDisabled(t.id)\"\n [disabled]=\"isTabDisabled(t.id)\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n (click)=\"setTab(t.id)\"\n >\n {{ t.label }}\n @if (isTabDisabled(t.id)) {\n <span class=\"ml-auto text-xs font-medium uppercase tracking-wide text-zinc-400\">Disabled</span>\n }\n </button>\n }\n </nav>\n\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"flex items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n }\n }\n</div>\n\n<ng-template #settingsPanels>\n @if (tab() === 'knowledge') {\n <div class=\"flex w-full max-w-4xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>What to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatToSay', $event)\"\n placeholder=\"Hours, parking, payment options, arrival instructions, emergencies\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>What not to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatNotToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatNotToSay', $event)\"\n placeholder=\"Clinical advice, unverified prices, PHI, promises the practice cannot keep\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatNotToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n </div>\n } @else if (tab() === 'general') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">\n Name<span required></span>\n </label>\n <ed-icon\n name=\"info\"\n [size]=\"16\"\n class=\"text-light\"\n title=\"How the AI introduces itself on calls\"\n />\n </div>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('general', 'agentName')\"\n (ngModelChange)=\"updateField('general', 'agentName', $event)\"\n autocomplete=\"off\"\n />\n </div>\n\n <div class=\"flex items-end gap-sm\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-xs\">\n <label>Voice<span required></span></label>\n <select\n class=\"form-select is-sm settings-page__select\"\n [ngModel]=\"selectedVoiceId()\"\n (ngModelChange)=\"onVoiceChange($event)\"\n autocomplete=\"off\"\n >\n @for (v of voicePresets; track v.id) {\n <option [ngValue]=\"v.id\">{{ v.gender }} \u00B7 {{ v.label }}</option>\n }\n </select>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__voice-play inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-md border border-base bg-white disabled:cursor-wait disabled:opacity-60\"\n [disabled]=\"!selectedVoiceId() || voicePreviewBusy()\"\n [attr.aria-label]=\"voicePreviewPlaying() ? 'Stop voice preview' : 'Play voice preview'\"\n [title]=\"voicePreviewPlaying() ? 'Stop preview' : 'Play sample'\"\n (click)=\"toggleVoicePreview()\"\n >\n <ed-icon [name]=\"voicePreviewPlaying() ? 'stop' : 'play_arrow'\" [size]=\"20\" />\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Tone</label>\n <div class=\"flex flex-wrap gap-xs\" role=\"radiogroup\" aria-label=\"Tone\">\n @for (tone of toneOptions; track tone.value) {\n <button\n type=\"button\"\n class=\"settings-page__tone cursor-pointer rounded-full border border-transparent bg-lighter px-sm py-2xs fs-xs font-medium text-body\"\n [class.settings-page__tone--active]=\"selectedTone() === tone.value\"\n [class.font-semibold]=\"selectedTone() === tone.value\"\n [attr.aria-checked]=\"selectedTone() === tone.value\"\n role=\"radio\"\n (click)=\"setTone(tone.value)\"\n >\n {{ tone.label }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Inbound Greetings<span required></span></label>\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n spellcheck=\"false\"\n [maxlength]=\"welcomeMax\"\n [placeholder]=\"welcomePlaceholder()\"\n [ngModel]=\"welcomeMessage()\"\n (ngModelChange)=\"updateWelcomeMessage($event)\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ welcomeMessage().length }}/{{ welcomeMax }}</span>\n <div class=\"flex flex-wrap items-center gap-xs\">\n <span class=\"fs-xs font-medium text-dark\">Variables:</span>\n @for (v of greetingVariables; track v.key) {\n <button\n type=\"button\"\n class=\"settings-page__var-chip inline-flex h-5 cursor-pointer items-center rounded border border-base bg-white px-2xs fs-xs font-medium text-dark\"\n (click)=\"insertGreetingVariable(v.token)\"\n [title]=\"'Insert ' + v.token\"\n >\n {{ v.label }}\n </button>\n }\n </div>\n </div>\n </div>\n } @else if (tab() === 'phone') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">AI Answer Mode<span required></span></label>\n <ed-icon name=\"info\" [size]=\"16\" class=\"text-light\" title=\"When the AI picks up inbound calls\" />\n </div>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'answerMode')\"\n (ngModelChange)=\"updateField('phone', 'answerMode', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of answerModeOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>AI Phone Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'mainNumber')\"\n [ngModel]=\"fieldValue('phone', 'mainNumber')\"\n (ngModelChange)=\"updateField('phone', 'mainNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Number patients dial for the AI receptionist. Locked (managed by platform).</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Transfer Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'transferNumber')\"\n [ngModel]=\"fieldValue('phone', 'transferNumber')\"\n (ngModelChange)=\"updateField('phone', 'transferNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Staff / front-desk handoff number. Locked.</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Ringing Time Wait<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'ringTimeout')\"\n (ngModelChange)=\"selectNumberField('phone', 'ringTimeout', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of ringTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"event_available\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Create Follow-up Task</span>\n <span class=\"fs-xs text-light\">\n If no one answers in time, the agent auto-creates a high priority task.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n [attr.aria-pressed]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n aria-label=\"Create Follow-up Task\"\n (click)=\"updateField('phone', 'createFollowUpTask', !fieldValue('phone', 'createFollowUpTask'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Location Handled<span required></span></label>\n <div class=\"relative\" data-locations-dd (document:click)=\"onLocationsDocClick($event)\">\n <div\n class=\"form-input flex h-auto w-full cursor-pointer items-center justify-between gap-xs py-2xs text-left\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.opacity-55]=\"locations().length === 0\"\n [attr.aria-expanded]=\"locationsMenuOpen()\"\n [attr.aria-disabled]=\"locations().length === 0\"\n [attr.title]=\"locationSummary()\"\n aria-haspopup=\"listbox\"\n aria-label=\"Locations handled\"\n (click)=\"$event.stopPropagation(); locations().length && toggleLocationsMenu()\"\n (keydown.enter)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n (keydown.space)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n >\n <span class=\"flex min-w-0 flex-1 flex-wrap items-center gap-2xs overflow-hidden\">\n @if (locations().length === 0) {\n <span class=\"fs-sm text-light\">No locations available.</span>\n } @else if (selectedLocations().length === 0) {\n <span class=\"fs-sm text-light\">Select locations</span>\n } @else {\n @for (loc of visibleSelectedLocations(); track loc.id) {\n <span class=\"inline-flex h-5 items-center gap-2xs rounded bg-primary-50 px-2xs text-primary\">\n <span class=\"fs-xs font-medium\">{{ loc.name }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-3 w-3 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-primary\"\n [attr.aria-label]=\"'Remove ' + loc.name\"\n (click)=\"$event.stopPropagation(); toggleLocation(loc.id)\"\n >\n <ed-icon name=\"close\" [size]=\"12\" color=\"currentColor\" />\n </button>\n </span>\n }\n @if (hiddenLocationCount() > 0) {\n <span class=\"inline-flex h-5 items-center rounded bg-primary-50 px-2xs fs-xs font-medium text-primary\">\n +{{ hiddenLocationCount() }}\n </span>\n }\n }\n </span>\n <ed-icon name=\"expand_more\" [size]=\"16\" class=\"shrink-0 text-light\" />\n </div>\n @if (locationsMenuOpen()) {\n <ul\n class=\"settings-page__locations-menu absolute bottom-full z-50 m-0 mb-1 max-h-56 w-full list-none overflow-auto rounded-md border border-zinc-300 bg-white p-2xs shadow-lg\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n >\n @for (loc of locations(); track loc.id) {\n <li role=\"option\" [attr.aria-selected]=\"selectedLocationIds().includes(loc.id)\">\n <label class=\"flex cursor-pointer items-center gap-xs rounded px-xs py-2xs fs-sm text-dark hover:bg-lighter\">\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 accent-blue-600\"\n [checked]=\"selectedLocationIds().includes(loc.id)\"\n (change)=\"toggleLocation(loc.id)\"\n />\n <span class=\"min-w-0 truncate\">{{ loc.name }}</span>\n </label>\n </li>\n }\n </ul>\n }\n </div>\n @if (locations().length === 0) {\n <p class=\"m-0 fs-sm text-light\">No locations available.</p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Max AI Call Duration<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'maxCallDurationMin')\"\n (ngModelChange)=\"selectNumberField('phone', 'maxCallDurationMin', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of maxCallDurationOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Silence Timeout<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'silenceTimeoutSec')\"\n (ngModelChange)=\"selectNumberField('phone', 'silenceTimeoutSec', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of silenceTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>After-Hours Behaviour<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'afterHoursBehavior')\"\n (ngModelChange)=\"updateField('phone', 'afterHoursBehavior', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of afterHoursOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-md border-t border-light pt-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Minimum lead time (hours)</label>\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n min=\"0\"\n [ngModel]=\"fieldValue('scheduling', 'leadTimeHours')\"\n (ngModelChange)=\"updateField('scheduling', 'leadTimeHours', +$event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Earliest bookable slot from now.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"calendar_month\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Allow same-day booking</span>\n <span class=\"fs-xs text-light\">\n Let patients book appointments later today.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n [attr.aria-pressed]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n aria-label=\"Allow same-day booking\"\n (click)=\"updateField('scheduling', 'allowSameDay', !fieldValue('scheduling', 'allowSameDay'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n </div>\n } @else if (tab() === 'transcripts') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Call Recordings<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'recordingRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'recordingRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Transcripts<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'transcriptRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'transcriptRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"m-0\">Disclosure Warning</label>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"disclosureEnabled()\"\n [attr.aria-pressed]=\"disclosureEnabled()\"\n aria-label=\"Disclosure Warning\"\n (click)=\"setDisclosureEnabled(!disclosureEnabled())\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n @if (disclosureEnabled()) {\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n [maxlength]=\"disclosureMax\"\n [ngModel]=\"disclosureText()\"\n (ngModelChange)=\"updateDisclosureText($event)\"\n autocomplete=\"off\"\n ></textarea>\n }\n </div>\n </div>\n } @else if (tab() === 'advanced') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary-50 text-primary\" aria-hidden=\"true\">\n <ed-icon name=\"sparkle\" [size]=\"20\" />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">\n @if (toggling()) {\n Updating\u2026\n } @else if (online() === true) {\n Agent online\n } @else if (online() === false) {\n Agent offline\n } @else {\n Status unknown\n }\n </span>\n <span class=\"fs-xs text-light\">\n @if (online() === true) {\n AI receptionist is answering inbound calls.\n } @else if (online() === false) {\n AI is offline \u2014 calls go to the front desk.\n } @else {\n Checking agent status\u2026\n }\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"online() === true\"\n [disabled]=\"agentSwitchDisabled()\"\n [attr.aria-pressed]=\"online() === true\"\n aria-label=\"Agent online\"\n (click)=\"onAgentToggleClick()\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Model version</label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('advanced', 'modelVersion')\"\n disabled\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Set by Edvak support.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-lighter px-base py-sm opacity-90\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Debug mode</span>\n <span class=\"fs-xs text-light\">Verbose logging \u2014 contact Edvak to change.</span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('advanced', 'debugMode')\"\n disabled\n [attr.aria-pressed]=\"!!fieldValue('advanced', 'debugMode')\"\n aria-label=\"Debug mode\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n } @else {\n <div class=\"grid grid-cols-2 gap-x-md gap-y-md below-md:grid-cols-1\">\n @for (field of fieldsForTab(); track field.key) {\n @if (field.type === 'boolean') {\n <label\n class=\"col-span-full flex cursor-pointer items-center justify-between gap-base rounded-md border border-base bg-lighter px-base py-sm\"\n [class.cursor-default]=\"fieldIsReadOnly(tab(), field.key)\"\n [class.opacity-90]=\"fieldIsReadOnly(tab(), field.key)\"\n >\n <div class=\"flex min-w-0 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">{{ field.label }}</span>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n </div>\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 shrink-0 accent-blue-600 disabled:cursor-not-allowed\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n </label>\n } @else if (field.type === 'select' && field.options?.length) {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n <select\n class=\"form-select is-sm\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n >\n @for (opt of field.options; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n } @else {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n @if (field.type === 'number') {\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, +$event)\"\n autocomplete=\"off\"\n />\n } @else {\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n }\n </div>\n }\n }\n </div>\n }\n</ng-template>\n\n<eds-knowledge-test-modal\n [open]=\"knowledgeTestOpen()\"\n [whatToSay]=\"whatToSay()\"\n [whatNotToSay]=\"whatNotToSay()\"\n [voiceId]=\"selectedVoiceId()\"\n (closed)=\"closeTestCall()\"\n/>\n\n@if (confirmOffOpen()) {\n <app-modal\n title=\"Turn off AI receptionist?\"\n subtitle=\"Inbound callers will be transferred to the front desk instead of the AI.\"\n maxWidth=\"480px\"\n (closed)=\"cancelConfirmOff()\"\n >\n <p class=\"mb-4 m-0 text-sm leading-normal text-zinc-500\">While offline, the AI will not answer calls. Callers are routed to the human receptionist.</p>\n <div class=\"flex justify-end gap-2\">\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"cancelConfirmOff()\">Cancel</ed-button>\n <ed-button variant=\"danger\" fill size=\"sm\" [disabled]=\"toggling()\" (click$)=\"confirmTurnOff()\">\n Turn off AI receptionist\n </ed-button>\n </div>\n </app-modal>\n}\n", styles: [":host{display:block}.settings-page__layout{grid-template-columns:240px minmax(0,1fr)}.settings-page__nav-item:hover{background:var(--eds-surface-l1, #f7f9fa);color:var(--eds-text-primary, #41464c)}.settings-page__nav-item--active{background:var(--eds-color-primary-light, #eaf1fe);color:var(--eds-text-brand, #2162f0)}.settings-page__nav-item--disabled,.settings-page__nav-item:disabled{opacity:.45;cursor:not-allowed;color:var(--eds-text-tertiary, #767676)}.settings-page__nav-item--disabled:hover,.settings-page__nav-item:disabled:hover{background:none;color:var(--eds-text-tertiary, #767676)}.settings-page__select{min-height:2.25rem;background:#fff;border:1px solid #c5c7d0;color:#1f2328}.settings-page__locations-menu{box-shadow:0 8px 24px #0f172a29}.settings-page__voice-play{color:var(--eds-text-primary, #41464c)}.settings-page__voice-play:hover:not(:disabled){border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__tone--active{background:var(--eds-surface-l0, #fff);border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__var-chip:hover{border-color:var(--eds-brand-300, #94c5f9);color:var(--eds-brand-600, #2162f0)}.settings-page__switch{width:44px;height:26px;border-radius:999px;border:none;background:var(--eds-gray-300, #cbd5e1);padding:3px;cursor:pointer;transition:background .15s ease}.settings-page__switch--on{background:var(--eds-brand-600, #2162f0)}.settings-page__switch:disabled{opacity:.55;cursor:not-allowed}.settings-page__switch-thumb{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a33;transition:transform .15s ease}.settings-page__switch--on .settings-page__switch-thumb{transform:translate(18px)}.form-input:disabled,.form-select:disabled{color:var(--eds-color-text-muted, #64748b);background:var(--eds-color-surface-alt, #f1f5f9);border-color:var(--eds-color-border, #e2e8f0);cursor:not-allowed;opacity:1}@media(max-width:960px){.settings-page__layout{grid-template-columns:1fr}}\n"] }]
|
|
5688
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5689
|
+
'[class.settings-page-host--drawer]': 'presentation() === "drawer"',
|
|
5690
|
+
}, template: "<div\n class=\"settings-page\"\n [class.p-base]=\"presentation() === 'page'\"\n [class.bg-lighter]=\"presentation() === 'page'\"\n [class.min-h-full]=\"presentation() === 'page'\"\n [class.h-full]=\"presentation() === 'page'\"\n [class.min-h-0]=\"presentation() === 'page'\"\n [class.overflow-auto]=\"presentation() === 'page'\"\n [class.flex]=\"presentation() === 'drawer'\"\n [class.h-full]=\"presentation() === 'drawer'\"\n [class.min-h-0]=\"presentation() === 'drawer'\"\n [class.flex-col]=\"presentation() === 'drawer'\"\n>\n @if (presentation() === 'page') {\n <header class=\"mb-6 flex items-start justify-between gap-4\">\n <div>\n <h4>Agent settings</h4>\n <p class=\"mt-2 text-base leading-normal text-zinc-500\">Configure AI receptionist behavior and safety</p>\n </div>\n <div class=\"flex shrink-0 items-center gap-3\">\n @if (saved()) {\n <span class=\"text-sm font-medium text-green-500\">Saved</span>\n }\n <ed-button variant=\"primary\" fill size=\"sm\" [disabled]=\"saving()\" (click$)=\"save()\">\n <ed-icon slot=\"prefix\" name=\"save\" [size]=\"16\" />\n {{ saving() ? 'Saving\u2026' : 'Save changes' }}\n </ed-button>\n </div>\n </header>\n }\n\n @if (loading()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\" aria-busy=\"true\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"presentation\">\n @for (_ of navSkeletonRows; track _) {\n <li class=\"mb-1\">\n <ed-skeleton class=\"h-8 w-full !rounded-md\"></ed-skeleton>\n </li>\n }\n </ul>\n </nav>\n <article class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md overflow-y-auto bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n } @else {\n <div\n class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\"\n aria-busy=\"true\"\n >\n <nav class=\"flex flex-col gap-1 rounded-lg border border-base bg-white p-2 shadow-sm\" aria-label=\"Settings sections\">\n @for (_ of navSkeletonRows; track _) {\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n }\n </nav>\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-5 w-40\"></ed-skeleton>\n <ed-skeleton class=\"h-3 w-72\"></ed-skeleton>\n </header>\n @for (_ of fieldSkeletonRows; track _) {\n <div class=\"grid gap-2xs\">\n <ed-skeleton class=\"h-3 w-24\"></ed-skeleton>\n <ed-skeleton class=\"h-10 w-full !rounded-md\"></ed-skeleton>\n </div>\n }\n </article>\n </div>\n }\n } @else if (settings()) {\n @if (presentation() === 'drawer') {\n <div class=\"flex min-h-0 flex-1\">\n <nav class=\"w-[220px] h-full shrink-0 overflow-y-auto p-base bg-lighter-2\" aria-label=\"Settings sections\">\n <ul role=\"tablist\" aria-label=\"Settings sections\">\n @for (t of tabs; track t.id) {\n <li\n role=\"presentation\"\n [class.cursor-pointer]=\"!isTabDisabled(t.id)\"\n [class.cursor-not-allowed]=\"isTabDisabled(t.id)\"\n >\n <div\n class=\"kpi-menu\"\n role=\"tab\"\n [attr.id]=\"'agent-settings-tab-' + t.id\"\n [attr.aria-selected]=\"tab() === t.id\"\n [attr.aria-disabled]=\"isTabDisabled(t.id)\"\n [attr.tabindex]=\"tab() === t.id ? 0 : -1\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n [class.kpi-menu-active]=\"tab() === t.id\"\n [class.opacity-45]=\"isTabDisabled(t.id)\"\n (click)=\"setTab(t.id)\"\n (keydown.enter)=\"setTab(t.id)\"\n (keydown.space)=\"$event.preventDefault(); setTab(t.id)\"\n >\n <div class=\"flex items-center gap-xs w-full\">\n <span class=\"whitespace-nowrap flex-1 truncate\">{{ t.label }}</span>\n @if (isTabDisabled(t.id)) {\n <span class=\"shrink-0 fs-2xs font-medium uppercase tracking-wide text-lighter\">Off</span>\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </nav>\n\n <article\n class=\"flex min-h-0 min-w-0 flex-1 flex-col gap-md bg-white p-base\"\n [class.overflow-y-auto]=\"!locationsMenuOpen()\"\n [class.overflow-visible]=\"locationsMenuOpen()\"\n >\n <header class=\"flex shrink-0 items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n } @else {\n <div class=\"grid grid-cols-[240px_minmax(0,1fr)] max-[960px]:grid-cols-1 items-start gap-5\">\n <nav\n class=\"sticky top-4 flex max-h-[calc(100vh-120px)] max-[960px]:static max-[960px]:max-h-none max-[960px]:flex-row max-[960px]:flex-wrap flex-col gap-1 overflow-y-auto rounded-lg border border-base bg-white p-2 shadow-sm\"\n aria-label=\"Settings sections\"\n >\n @for (t of tabs; track t.id) {\n <button\n type=\"button\"\n class=\"settings-page__nav-item flex w-full max-[960px]:w-auto max-[960px]:flex-1 cursor-pointer items-center justify-between gap-3 rounded-md border-none bg-transparent px-4 py-3 text-left text-sm font-medium leading-snug text-zinc-600\"\n [class.settings-page__nav-item--active]=\"tab() === t.id\"\n [class.settings-page__nav-item--disabled]=\"isTabDisabled(t.id)\"\n [disabled]=\"isTabDisabled(t.id)\"\n [attr.title]=\"isTabDisabled(t.id) ? 'This section is currently disabled' : null\"\n (click)=\"setTab(t.id)\"\n >\n {{ t.label }}\n @if (isTabDisabled(t.id)) {\n <span class=\"ml-auto text-xs font-medium uppercase tracking-wide text-zinc-400\">Disabled</span>\n }\n </button>\n }\n </nav>\n\n <article class=\"flex min-h-96 flex-col gap-md overflow-hidden rounded-lg border border-light bg-white p-base\">\n <header class=\"flex items-start justify-between gap-base\">\n <div class=\"min-w-0\">\n <h5 class=\"m-0\">{{ sectionMeta().title }}</h5>\n @if (tab() !== 'knowledge' && tab() !== 'general' && tab() !== 'phone' && tab() !== 'transcripts') {\n <p class=\"m-0 mt-2xs max-w-2xl fs-sm text-light\">{{ sectionMeta().description }}</p>\n }\n </div>\n @if (tab() === 'knowledge') {\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"openTestCall()\">\n <ed-icon slot=\"prefix\" name=\"phone_call\" [size]=\"16\" />\n Test Call\n </ed-button>\n }\n </header>\n\n @if (sectionIsReadOnly(tab())) {\n <p class=\"flex items-center gap-sm rounded-md border border-light bg-lighter px-base py-sm fs-sm text-light\">\n <ed-icon name=\"lock\" [size]=\"18\" />\n These settings are managed by Edvak. Contact support to request changes.\n </p>\n }\n\n <ng-container [ngTemplateOutlet]=\"settingsPanels\" />\n </article>\n </div>\n }\n }\n</div>\n\n<ng-template #settingsPanels>\n @if (tab() === 'knowledge') {\n <div class=\"flex w-full max-w-4xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>What to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatToSay', $event)\"\n placeholder=\"Hours, parking, payment options, arrival instructions, emergencies\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>What not to say<span required></span></label>\n <textarea\n class=\"form-textarea min-h-56\"\n rows=\"10\"\n [maxlength]=\"knowledgeMax\"\n [ngModel]=\"whatNotToSay()\"\n (ngModelChange)=\"updateKnowledgeField('whatNotToSay', $event)\"\n placeholder=\"Clinical advice, unverified prices, PHI, promises the practice cannot keep\u2026\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ whatNotToSay().length }}/{{ knowledgeMax }}</span>\n </div>\n </div>\n } @else if (tab() === 'general') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">\n Name<span required></span>\n </label>\n <ed-icon\n name=\"info\"\n [size]=\"16\"\n class=\"text-light\"\n title=\"How the AI introduces itself on calls\"\n />\n </div>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('general', 'agentName')\"\n (ngModelChange)=\"updateField('general', 'agentName', $event)\"\n autocomplete=\"off\"\n />\n </div>\n\n <div class=\"flex items-end gap-sm\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-xs\">\n <label>Voice<span required></span></label>\n <select\n class=\"form-select is-sm settings-page__select\"\n [ngModel]=\"selectedVoiceId()\"\n (ngModelChange)=\"onVoiceChange($event)\"\n autocomplete=\"off\"\n >\n @for (v of voicePresets; track v.id) {\n <option [ngValue]=\"v.id\">{{ v.gender }} \u00B7 {{ v.label }}</option>\n }\n </select>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__voice-play inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-md border border-base bg-white disabled:cursor-wait disabled:opacity-60\"\n [disabled]=\"!selectedVoiceId() || voicePreviewBusy()\"\n [attr.aria-label]=\"voicePreviewPlaying() ? 'Stop voice preview' : 'Play voice preview'\"\n [title]=\"voicePreviewPlaying() ? 'Stop preview' : 'Play sample'\"\n (click)=\"toggleVoicePreview()\"\n >\n <ed-icon [name]=\"voicePreviewPlaying() ? 'stop' : 'play_arrow'\" [size]=\"20\" />\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Tone</label>\n <div class=\"flex flex-wrap gap-xs\" role=\"radiogroup\" aria-label=\"Tone\">\n @for (tone of toneOptions; track tone.value) {\n <button\n type=\"button\"\n class=\"settings-page__tone cursor-pointer rounded-full border border-transparent bg-lighter px-sm py-2xs fs-xs font-medium text-body\"\n [class.settings-page__tone--active]=\"selectedTone() === tone.value\"\n [class.font-semibold]=\"selectedTone() === tone.value\"\n [attr.aria-checked]=\"selectedTone() === tone.value\"\n role=\"radio\"\n (click)=\"setTone(tone.value)\"\n >\n {{ tone.label }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Inbound Greetings<span required></span></label>\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n spellcheck=\"false\"\n [maxlength]=\"welcomeMax\"\n [placeholder]=\"welcomePlaceholder()\"\n [ngModel]=\"welcomeMessage()\"\n (ngModelChange)=\"updateWelcomeMessage($event)\"\n autocomplete=\"off\"\n ></textarea>\n <span class=\"block text-right fs-xs text-light\">{{ welcomeMessage().length }}/{{ welcomeMax }}</span>\n <div class=\"flex flex-wrap items-center gap-xs\">\n <span class=\"fs-xs font-medium text-dark\">Variables:</span>\n @for (v of greetingVariables; track v.key) {\n <button\n type=\"button\"\n class=\"settings-page__var-chip inline-flex h-5 cursor-pointer items-center rounded border border-base bg-white px-2xs fs-xs font-medium text-dark\"\n (click)=\"insertGreetingVariable(v.token)\"\n [title]=\"'Insert ' + v.token\"\n >\n {{ v.label }}\n </button>\n }\n </div>\n </div>\n </div>\n } @else if (tab() === 'phone') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center justify-between gap-xs\">\n <label class=\"m-0\">AI Answer Mode<span required></span></label>\n <ed-icon name=\"info\" [size]=\"16\" class=\"text-light\" title=\"When the AI picks up inbound calls\" />\n </div>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'answerMode')\"\n (ngModelChange)=\"updateField('phone', 'answerMode', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of answerModeOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>AI Phone Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'mainNumber')\"\n [ngModel]=\"fieldValue('phone', 'mainNumber')\"\n (ngModelChange)=\"updateField('phone', 'mainNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Number patients dial for the AI receptionist. Locked (managed by platform).</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Transfer Number<span required></span></label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"isFieldReadOnly('phone', 'transferNumber')\"\n [ngModel]=\"fieldValue('phone', 'transferNumber')\"\n (ngModelChange)=\"updateField('phone', 'transferNumber', $event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Staff / front-desk handoff number. Locked.</span>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Ringing Time Wait<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'ringTimeout')\"\n (ngModelChange)=\"selectNumberField('phone', 'ringTimeout', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of ringTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"event_available\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Create Follow-up Task</span>\n <span class=\"fs-xs text-light\">\n If no one answers in time, the agent auto-creates a high priority task.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n [attr.aria-pressed]=\"!!fieldValue('phone', 'createFollowUpTask')\"\n aria-label=\"Create Follow-up Task\"\n (click)=\"updateField('phone', 'createFollowUpTask', !fieldValue('phone', 'createFollowUpTask'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Location Handled<span required></span></label>\n <div class=\"relative\" data-locations-dd (document:click)=\"onLocationsDocClick($event)\">\n <div\n class=\"form-input flex h-auto w-full cursor-pointer items-center justify-between gap-xs py-2xs text-left\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.opacity-55]=\"locations().length === 0\"\n [attr.aria-expanded]=\"locationsMenuOpen()\"\n [attr.aria-disabled]=\"locations().length === 0\"\n [attr.title]=\"locationSummary()\"\n aria-haspopup=\"listbox\"\n aria-label=\"Locations handled\"\n (click)=\"$event.stopPropagation(); locations().length && toggleLocationsMenu()\"\n (keydown.enter)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n (keydown.space)=\"$event.preventDefault(); locations().length && toggleLocationsMenu()\"\n >\n <span class=\"flex min-w-0 flex-1 flex-wrap items-center gap-2xs overflow-hidden\">\n @if (locations().length === 0) {\n <span class=\"fs-sm text-light\">No locations available.</span>\n } @else if (selectedLocations().length === 0) {\n <span class=\"fs-sm text-light\">Select locations</span>\n } @else {\n @for (loc of visibleSelectedLocations(); track loc.id) {\n <span class=\"inline-flex h-5 items-center gap-2xs rounded bg-primary-50 px-2xs text-primary\">\n <span class=\"fs-xs font-medium\">{{ loc.name }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-3 w-3 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-primary\"\n [attr.aria-label]=\"'Remove ' + loc.name\"\n (click)=\"$event.stopPropagation(); toggleLocation(loc.id)\"\n >\n <ed-icon name=\"close\" [size]=\"12\" color=\"currentColor\" />\n </button>\n </span>\n }\n @if (hiddenLocationCount() > 0) {\n <span class=\"inline-flex h-5 items-center rounded bg-primary-50 px-2xs fs-xs font-medium text-primary\">\n +{{ hiddenLocationCount() }}\n </span>\n }\n }\n </span>\n <ed-icon name=\"expand_more\" [size]=\"16\" class=\"shrink-0 text-light\" />\n </div>\n @if (locationsMenuOpen()) {\n <ul\n class=\"settings-page__locations-menu absolute bottom-full z-50 m-0 mb-1 max-h-56 w-full list-none overflow-auto rounded-md border border-zinc-300 bg-white p-2xs shadow-lg\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n >\n @for (loc of locations(); track loc.id) {\n <li role=\"option\" [attr.aria-selected]=\"selectedLocationIds().includes(loc.id)\">\n <label class=\"flex cursor-pointer items-center gap-xs rounded px-xs py-2xs fs-sm text-dark hover:bg-lighter\">\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 accent-blue-600\"\n [checked]=\"selectedLocationIds().includes(loc.id)\"\n (change)=\"toggleLocation(loc.id)\"\n />\n <span class=\"min-w-0 truncate\">{{ loc.name }}</span>\n </label>\n </li>\n }\n </ul>\n }\n </div>\n @if (locations().length === 0) {\n <p class=\"m-0 fs-sm text-light\">No locations available.</p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Max AI Call Duration<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'maxCallDurationMin')\"\n (ngModelChange)=\"selectNumberField('phone', 'maxCallDurationMin', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of maxCallDurationOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Silence Timeout<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('phone', 'silenceTimeoutSec')\"\n (ngModelChange)=\"selectNumberField('phone', 'silenceTimeoutSec', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of silenceTimeoutOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>After-Hours Behaviour<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"fieldValue('phone', 'afterHoursBehavior')\"\n (ngModelChange)=\"updateField('phone', 'afterHoursBehavior', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of afterHoursOptions; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-md border-t border-light pt-md\">\n <div class=\"settings-page__booking-mode flex flex-col gap-sm\">\n <div class=\"flex flex-col gap-2xs\">\n <span class=\"fs-sm font-medium text-dark\">Appointment booking mode</span>\n <span class=\"fs-xs text-light\">\n Controls how the voice agent writes bookings to the EHR for this practice.\n Applied when you click Save changes.\n </span>\n </div>\n\n @if (bookingModeLoading()) {\n <p class=\"m-0 fs-sm text-light\">Loading booking mode\u2026</p>\n } @else {\n <div class=\"flex flex-col gap-xs\" role=\"radiogroup\" aria-label=\"Appointment booking mode\">\n @for (opt of bookingModeOptions(); track opt.value) {\n <button\n type=\"button\"\n class=\"settings-page__booking-option flex w-full cursor-pointer items-start gap-sm rounded-md border border-base bg-white p-sm text-left\"\n [class.settings-page__booking-option--active]=\"bookingMode() === opt.value\"\n [disabled]=\"saving()\"\n role=\"radio\"\n [attr.aria-checked]=\"bookingMode() === opt.value\"\n (click)=\"selectBookingMode(opt.value)\"\n >\n <span\n class=\"settings-page__booking-radio mt-2xs flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-zinc-300\"\n [class.settings-page__booking-radio--on]=\"bookingMode() === opt.value\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm font-medium text-dark\">{{ opt.label }}</span>\n @if (opt.description) {\n <span class=\"fs-xs text-light\">{{ opt.description }}</span>\n }\n </span>\n </button>\n }\n </div>\n }\n\n @if (bookingModeError(); as err) {\n <p class=\"m-0 rounded-md border border-red-200 bg-red-50 px-sm py-xs fs-sm text-red-600\" role=\"alert\">\n {{ err }}\n </p>\n }\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Minimum lead time (hours)</label>\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n min=\"0\"\n [ngModel]=\"fieldValue('scheduling', 'leadTimeHours')\"\n (ngModelChange)=\"updateField('scheduling', 'leadTimeHours', +$event)\"\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Earliest bookable slot from now.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <ed-icon name=\"calendar_month\" [size]=\"20\" class=\"shrink-0 text-primary\" />\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Allow same-day booking</span>\n <span class=\"fs-xs text-light\">\n Let patients book appointments later today.\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n [attr.aria-pressed]=\"!!fieldValue('scheduling', 'allowSameDay')\"\n aria-label=\"Allow same-day booking\"\n (click)=\"updateField('scheduling', 'allowSameDay', !fieldValue('scheduling', 'allowSameDay'))\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n </div>\n } @else if (tab() === 'transcripts') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Call Recordings<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'recordingRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'recordingRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Keep Transcripts<span required></span></label>\n <select\n class=\"form-select is-sm\"\n [ngModel]=\"numberFieldAsString('transcripts', 'transcriptRetainDays')\"\n (ngModelChange)=\"selectNumberField('transcripts', 'transcriptRetainDays', $event)\"\n autocomplete=\"off\"\n >\n @for (opt of retentionOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"m-0\">Disclosure Warning</label>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"disclosureEnabled()\"\n [attr.aria-pressed]=\"disclosureEnabled()\"\n aria-label=\"Disclosure Warning\"\n (click)=\"setDisclosureEnabled(!disclosureEnabled())\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n @if (disclosureEnabled()) {\n <textarea\n class=\"form-textarea min-h-24\"\n rows=\"4\"\n [maxlength]=\"disclosureMax\"\n [ngModel]=\"disclosureText()\"\n (ngModelChange)=\"updateDisclosureText($event)\"\n autocomplete=\"off\"\n ></textarea>\n }\n </div>\n </div>\n } @else if (tab() === 'advanced') {\n <div class=\"flex w-full max-w-3xl flex-col gap-md\">\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-white p-sm\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary-50 text-primary\" aria-hidden=\"true\">\n <ed-icon name=\"sparkle\" [size]=\"20\" />\n </span>\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">\n @if (toggling()) {\n Updating\u2026\n } @else if (online() === true) {\n Agent online\n } @else if (online() === false) {\n Agent offline\n } @else {\n Status unknown\n }\n </span>\n <span class=\"fs-xs text-light\">\n @if (online() === true) {\n AI receptionist is answering inbound calls.\n } @else if (online() === false) {\n AI is offline \u2014 calls go to the front desk.\n } @else {\n Checking agent status\u2026\n }\n </span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"online() === true\"\n [disabled]=\"agentSwitchDisabled()\"\n [attr.aria-pressed]=\"online() === true\"\n aria-label=\"Agent online\"\n (click)=\"onAgentToggleClick()\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-xs\">\n <label>Model version</label>\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [ngModel]=\"fieldValue('advanced', 'modelVersion')\"\n disabled\n autocomplete=\"off\"\n />\n <span class=\"fs-xs text-light\">Set by Edvak support.</span>\n </div>\n\n <div class=\"flex items-center gap-sm rounded-md border border-base bg-lighter px-base py-sm opacity-90\">\n <div class=\"flex min-w-0 flex-1 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">Debug mode</span>\n <span class=\"fs-xs text-light\">Verbose logging \u2014 contact Edvak to change.</span>\n </div>\n <button\n type=\"button\"\n class=\"settings-page__switch shrink-0\"\n [class.settings-page__switch--on]=\"!!fieldValue('advanced', 'debugMode')\"\n disabled\n [attr.aria-pressed]=\"!!fieldValue('advanced', 'debugMode')\"\n aria-label=\"Debug mode\"\n >\n <span class=\"settings-page__switch-thumb\"></span>\n </button>\n </div>\n </div>\n } @else {\n <div class=\"grid grid-cols-2 gap-x-md gap-y-md below-md:grid-cols-1\">\n @for (field of fieldsForTab(); track field.key) {\n @if (field.type === 'boolean') {\n <label\n class=\"col-span-full flex cursor-pointer items-center justify-between gap-base rounded-md border border-base bg-lighter px-base py-sm\"\n [class.cursor-default]=\"fieldIsReadOnly(tab(), field.key)\"\n [class.opacity-90]=\"fieldIsReadOnly(tab(), field.key)\"\n >\n <div class=\"flex min-w-0 flex-col gap-2xs\">\n <span class=\"fs-sm text-dark\">{{ field.label }}</span>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n </div>\n <input\n type=\"checkbox\"\n class=\"h-4 w-4 shrink-0 accent-blue-600 disabled:cursor-not-allowed\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n </label>\n } @else if (field.type === 'select' && field.options?.length) {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n <select\n class=\"form-select is-sm\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n >\n @for (opt of field.options; track opt.value) {\n <option [ngValue]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n </div>\n } @else {\n <div class=\"flex flex-col gap-xs\">\n <label>{{ field.label }}</label>\n @if (field.description) {\n <span\n class=\"fs-sm text-light\"\n [class.text-lighter]=\"fieldIsReadOnly(tab(), field.key)\"\n >{{ field.description }}</span>\n }\n @if (field.type === 'number') {\n <input\n class=\"form-input is-sm\"\n type=\"number\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, +$event)\"\n autocomplete=\"off\"\n />\n } @else {\n <input\n class=\"form-input is-sm\"\n type=\"text\"\n [disabled]=\"fieldIsReadOnly(tab(), field.key)\"\n [ngModel]=\"fieldValue(tab(), field.key)\"\n (ngModelChange)=\"updateField(tab(), field.key, $event)\"\n autocomplete=\"off\"\n />\n }\n </div>\n }\n }\n </div>\n }\n</ng-template>\n\n<eds-knowledge-test-modal\n [open]=\"knowledgeTestOpen()\"\n [whatToSay]=\"whatToSay()\"\n [whatNotToSay]=\"whatNotToSay()\"\n [voiceId]=\"selectedVoiceId()\"\n (closed)=\"closeTestCall()\"\n/>\n\n@if (confirmOffOpen()) {\n <app-modal\n title=\"Turn off AI receptionist?\"\n subtitle=\"Inbound callers will be transferred to the front desk instead of the AI.\"\n maxWidth=\"480px\"\n (closed)=\"cancelConfirmOff()\"\n >\n <p class=\"mb-4 m-0 text-sm leading-normal text-zinc-500\">While offline, the AI will not answer calls. Callers are routed to the human receptionist.</p>\n <div class=\"flex justify-end gap-2\">\n <ed-button variant=\"secondary\" outline size=\"sm\" (click$)=\"cancelConfirmOff()\">Cancel</ed-button>\n <ed-button variant=\"danger\" fill size=\"sm\" [disabled]=\"toggling()\" (click$)=\"confirmTurnOff()\">\n Turn off AI receptionist\n </ed-button>\n </div>\n </app-modal>\n}\n", styles: [":host{display:block}:host.settings-page-host--drawer{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.settings-page__layout{grid-template-columns:240px minmax(0,1fr)}.settings-page__nav-item:hover{background:var(--eds-surface-l1, #f7f9fa);color:var(--eds-text-primary, #41464c)}.settings-page__nav-item--active{background:var(--eds-color-primary-light, #eaf1fe);color:var(--eds-text-brand, #2162f0)}.settings-page__nav-item--disabled,.settings-page__nav-item:disabled{opacity:.45;cursor:not-allowed;color:var(--eds-text-tertiary, #767676)}.settings-page__nav-item--disabled:hover,.settings-page__nav-item:disabled:hover{background:none;color:var(--eds-text-tertiary, #767676)}.settings-page__select{min-height:2.25rem;background:#fff;border:1px solid #c5c7d0;color:#1f2328}.settings-page__locations-menu{box-shadow:0 8px 24px #0f172a29}.settings-page__voice-play{color:var(--eds-text-primary, #41464c)}.settings-page__voice-play:hover:not(:disabled){border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__tone--active{background:var(--eds-surface-l0, #fff);border-color:var(--eds-brand-600, #2162f0);color:var(--eds-brand-600, #2162f0)}.settings-page__var-chip:hover{border-color:var(--eds-brand-300, #94c5f9);color:var(--eds-brand-600, #2162f0)}.settings-page__switch{width:44px;height:26px;border-radius:999px;border:none;background:var(--eds-gray-300, #cbd5e1);padding:3px;cursor:pointer;transition:background .15s ease}.settings-page__switch--on{background:var(--eds-brand-600, #2162f0)}.settings-page__switch:disabled{opacity:.55;cursor:not-allowed}.settings-page__switch-thumb{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a33;transition:transform .15s ease}.settings-page__switch--on .settings-page__switch-thumb{transform:translate(18px)}.settings-page__booking-option:hover:not(:disabled){border-color:#94c5f9;background:#f8fbff}.settings-page__booking-option--active{border-color:var(--eds-brand-600, #2162f0);background:var(--eds-color-primary-light, #eaf1fe)}.settings-page__booking-option:disabled{opacity:.7;cursor:wait}.settings-page__booking-radio--on{border-color:var(--eds-brand-600, #2162f0);background:var(--eds-brand-600, #2162f0);box-shadow:inset 0 0 0 3px #fff}.form-input:disabled,.form-select:disabled{color:var(--eds-color-text-muted, #64748b);background:var(--eds-color-surface-alt, #f1f5f9);border-color:var(--eds-color-border, #e2e8f0);cursor:not-allowed;opacity:1}@media(max-width:960px){.settings-page__layout{grid-template-columns:1fr}}\n"] }]
|
|
5481
5691
|
}] });
|
|
5482
5692
|
|
|
5483
5693
|
var settingsPage_component = /*#__PURE__*/Object.freeze({
|
|
@@ -5754,7 +5964,7 @@ class AgentSettingsDrawerComponent {
|
|
|
5754
5964
|
}
|
|
5755
5965
|
}
|
|
5756
5966
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AgentSettingsDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5757
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: AgentSettingsDrawerComponent, isStandalone: true, selector: "eds-agent-settings-drawer", viewQueries: [{ propertyName: "settingsForm", first: true, predicate: ["settingsForm"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n edsViewportPortal\n class=\"eds-drawer-backdrop fixed left-0 top-0 z-[100100] flex h-[100vh] w-[100vw] justify-end\"\n (click)=\"onBackdropClick($event)\"\n role=\"presentation\"\n >\n <ed-drawer\n size=\"xl\"\n class=\"slide-in-rtl ed-main-sidepanel h-full\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Agent Setting\"\n >\n <ed-drawer-header class=\"shrink-0 border-b border-zinc-200 bg-white shadow-none\">\n <h6 data-new-heading=\"true\">Agent Setting</h6>\n <ed-icon-button\n name=\"close\"\n label=\"Close\"\n size=\"sm\"\n ghost\n (click$)=\"close()\"\n />\n </ed-drawer-header>\n\n <ed-drawer-body class=\"min-h-0 flex-1 overflow-
|
|
5967
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: AgentSettingsDrawerComponent, isStandalone: true, selector: "eds-agent-settings-drawer", viewQueries: [{ propertyName: "settingsForm", first: true, predicate: ["settingsForm"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n edsViewportPortal\n class=\"eds-drawer-backdrop fixed left-0 top-0 z-[100100] flex h-[100vh] w-[100vw] justify-end\"\n (click)=\"onBackdropClick($event)\"\n role=\"presentation\"\n >\n <ed-drawer\n size=\"xl\"\n class=\"slide-in-rtl ed-main-sidepanel h-full\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Agent Setting\"\n >\n <ed-drawer-header class=\"shrink-0 border-b border-zinc-200 bg-white shadow-none\">\n <h6 data-new-heading=\"true\">Agent Setting</h6>\n <ed-icon-button\n name=\"close\"\n label=\"Close\"\n size=\"sm\"\n ghost\n (click$)=\"close()\"\n />\n </ed-drawer-header>\n\n <ed-drawer-body class=\"min-h-0 flex-1 overflow-hidden p-0\">\n <eds-settings-page\n #settingsForm\n presentation=\"drawer\"\n />\n </ed-drawer-body>\n\n <ed-drawer-footer class=\"shrink-0 flex-row-reverse bg-lighter\">\n <ed-button\n variant=\"primary\"\n fill\n size=\"sm\"\n [disabled]=\"settingsForm.saving()\"\n (click$)=\"settingsForm.save()\"\n >\n {{ settingsForm.saving() ? 'Saving\u2026' : 'Save' }}\n </ed-button>\n <ed-button\n variant=\"default\"\n outline\n size=\"sm\"\n (click$)=\"close()\"\n >\n Cancel\n </ed-button>\n @if (settingsForm.saved()) {\n <span class=\"mr-auto fs-sm font-medium text-green-500\">Saved</span>\n }\n </ed-drawer-footer>\n </ed-drawer>\n </div>\n}\n", styles: ["@charset \"UTF-8\";.eds-drawer-backdrop{background-color:#0f172a66}\n"], dependencies: [{ kind: "component", type: SettingsPageComponent, selector: "eds-settings-page", inputs: ["presentation"], outputs: ["savedSuccessfully"] }, { kind: "component", type: EdButtonComponent, selector: "ed-button", inputs: ["variant", "size", "disabled", "ghost", "outline", "subtle", "fill", "loading", "block", "elevated", "shape", "type", "href", "routerLink", "rel", "target", "download", "ariaLabel"], outputs: ["click$"] }, { kind: "component", type: EdIconButtonComponent, selector: "ed-icon-button", inputs: ["label", "name", "size", "variant", "allowBubble", "ghost", "outline", "solid", "subtle", "shape", "type", "disabled", "loading", "toggle", "pressed", "id", "title", "nameAttr", "value", "autofocus", "tabIndex"], outputs: ["click", "focus", "blur", "click$", "focus$", "blur$"] }, { kind: "directive", type: ViewportPortalDirective, selector: "[edsViewportPortal]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5758
5968
|
}
|
|
5759
5969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AgentSettingsDrawerComponent, decorators: [{
|
|
5760
5970
|
type: Component,
|
|
@@ -5763,7 +5973,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
5763
5973
|
EdButtonComponent,
|
|
5764
5974
|
EdIconButtonComponent,
|
|
5765
5975
|
ViewportPortalDirective,
|
|
5766
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (open()) {\n <div\n edsViewportPortal\n class=\"eds-drawer-backdrop fixed left-0 top-0 z-[100100] flex h-[100vh] w-[100vw] justify-end\"\n (click)=\"onBackdropClick($event)\"\n role=\"presentation\"\n >\n <ed-drawer\n size=\"xl\"\n class=\"slide-in-rtl ed-main-sidepanel h-full\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Agent Setting\"\n >\n <ed-drawer-header class=\"shrink-0 border-b border-zinc-200 bg-white shadow-none\">\n <h6 data-new-heading=\"true\">Agent Setting</h6>\n <ed-icon-button\n name=\"close\"\n label=\"Close\"\n size=\"sm\"\n ghost\n (click$)=\"close()\"\n />\n </ed-drawer-header>\n\n <ed-drawer-body class=\"min-h-0 flex-1 overflow-
|
|
5976
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (open()) {\n <div\n edsViewportPortal\n class=\"eds-drawer-backdrop fixed left-0 top-0 z-[100100] flex h-[100vh] w-[100vw] justify-end\"\n (click)=\"onBackdropClick($event)\"\n role=\"presentation\"\n >\n <ed-drawer\n size=\"xl\"\n class=\"slide-in-rtl ed-main-sidepanel h-full\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Agent Setting\"\n >\n <ed-drawer-header class=\"shrink-0 border-b border-zinc-200 bg-white shadow-none\">\n <h6 data-new-heading=\"true\">Agent Setting</h6>\n <ed-icon-button\n name=\"close\"\n label=\"Close\"\n size=\"sm\"\n ghost\n (click$)=\"close()\"\n />\n </ed-drawer-header>\n\n <ed-drawer-body class=\"min-h-0 flex-1 overflow-hidden p-0\">\n <eds-settings-page\n #settingsForm\n presentation=\"drawer\"\n />\n </ed-drawer-body>\n\n <ed-drawer-footer class=\"shrink-0 flex-row-reverse bg-lighter\">\n <ed-button\n variant=\"primary\"\n fill\n size=\"sm\"\n [disabled]=\"settingsForm.saving()\"\n (click$)=\"settingsForm.save()\"\n >\n {{ settingsForm.saving() ? 'Saving\u2026' : 'Save' }}\n </ed-button>\n <ed-button\n variant=\"default\"\n outline\n size=\"sm\"\n (click$)=\"close()\"\n >\n Cancel\n </ed-button>\n @if (settingsForm.saved()) {\n <span class=\"mr-auto fs-sm font-medium text-green-500\">Saved</span>\n }\n </ed-drawer-footer>\n </ed-drawer>\n </div>\n}\n", styles: ["@charset \"UTF-8\";.eds-drawer-backdrop{background-color:#0f172a66}\n"] }]
|
|
5767
5977
|
}] });
|
|
5768
5978
|
|
|
5769
5979
|
class EdsModuleNavComponent {
|
|
@@ -6362,7 +6572,7 @@ const VOICE_RECEPTIONIST_FEATURE_ROUTES = [
|
|
|
6362
6572
|
{ path: '', pathMatch: 'full', redirectTo: 'dashboard' },
|
|
6363
6573
|
{
|
|
6364
6574
|
path: 'dashboard',
|
|
6365
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-dashboard-page.component-
|
|
6575
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-dashboard-page.component-CoqHpfH4.mjs').then((m) => m.DashboardPageComponent),
|
|
6366
6576
|
},
|
|
6367
6577
|
{
|
|
6368
6578
|
path: 'live',
|
|
@@ -6371,37 +6581,37 @@ const VOICE_RECEPTIONIST_FEATURE_ROUTES = [
|
|
|
6371
6581
|
{
|
|
6372
6582
|
path: '',
|
|
6373
6583
|
pathMatch: 'full',
|
|
6374
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-calls-page.component-
|
|
6584
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-calls-page.component-BLJTOY-p.mjs').then((m) => m.LiveCallsPageComponent),
|
|
6375
6585
|
},
|
|
6376
6586
|
{
|
|
6377
6587
|
path: ':id',
|
|
6378
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-monitor-page.component-
|
|
6588
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-monitor-page.component-MS9bpOBv.mjs').then((m) => m.LiveMonitorPageComponent),
|
|
6379
6589
|
},
|
|
6380
6590
|
],
|
|
6381
6591
|
},
|
|
6382
6592
|
{
|
|
6383
6593
|
path: 'history',
|
|
6384
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-page.component-
|
|
6594
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-page.component-CtdkYCXC.mjs').then((m) => m.CallHistoryPageComponent),
|
|
6385
6595
|
},
|
|
6386
6596
|
{
|
|
6387
6597
|
path: 'history/:id',
|
|
6388
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-detail-page.component-
|
|
6598
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-detail-page.component-pRSrt5C2.mjs').then((m) => m.CallHistoryDetailPageComponent),
|
|
6389
6599
|
},
|
|
6390
6600
|
{
|
|
6391
6601
|
path: 'activities',
|
|
6392
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-activities-page.component-
|
|
6602
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-activities-page.component-BlOth9CN.mjs').then((m) => m.ActivitiesPageComponent),
|
|
6393
6603
|
},
|
|
6394
6604
|
{
|
|
6395
6605
|
path: 'tasks',
|
|
6396
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-tasks-page.component-
|
|
6606
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-tasks-page.component-9X8YjNaO.mjs').then((m) => m.TasksPageComponent),
|
|
6397
6607
|
},
|
|
6398
6608
|
{
|
|
6399
6609
|
path: 'analytics',
|
|
6400
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-analytics-page.component-
|
|
6610
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-analytics-page.component-Cr02cCqy.mjs').then((m) => m.AnalyticsPageComponent),
|
|
6401
6611
|
},
|
|
6402
6612
|
{
|
|
6403
6613
|
path: 'audit',
|
|
6404
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-audit-page.component-
|
|
6614
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-audit-page.component-IKR5CpVe.mjs').then((m) => m.AuditPageComponent),
|
|
6405
6615
|
},
|
|
6406
6616
|
{
|
|
6407
6617
|
path: 'settings',
|
|
@@ -6409,7 +6619,7 @@ const VOICE_RECEPTIONIST_FEATURE_ROUTES = [
|
|
|
6409
6619
|
},
|
|
6410
6620
|
{
|
|
6411
6621
|
path: 'settings/outbound-purposes',
|
|
6412
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-outbound-purposes-page.component-
|
|
6622
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-outbound-purposes-page.component-Wxq3Aqip.mjs').then((m) => m.OutboundPurposesPageComponent),
|
|
6413
6623
|
},
|
|
6414
6624
|
{
|
|
6415
6625
|
path: 'knowledge',
|
|
@@ -6418,7 +6628,7 @@ const VOICE_RECEPTIONIST_FEATURE_ROUTES = [
|
|
|
6418
6628
|
},
|
|
6419
6629
|
{
|
|
6420
6630
|
path: 'wizard',
|
|
6421
|
-
loadComponent: () => import('./edvak99-voice-receptionist-widget-wizard-page.component-
|
|
6631
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-wizard-page.component-CktmVrGt.mjs').then((m) => m.WizardPageComponent),
|
|
6422
6632
|
},
|
|
6423
6633
|
];
|
|
6424
6634
|
/**
|
|
@@ -6480,4 +6690,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
6480
6690
|
*/
|
|
6481
6691
|
|
|
6482
6692
|
export { AiReceptionistApiService as A, ToastContainerComponent as B, VOICE_RECEPTIONIST_FEATURE_ROUTES as C, DashboardSocketService as D, EdAvatarComponent as E, VOICE_RECEPTIONIST_ROUTES as F, VOICE_RECEPTIONIST_SESSION as G, provideVoiceReceptionist as H, IconComponent as I, LiveCallsListService as L, ModalComponent as M, ToastService as T, VOICE_RECEPTIONIST_CONFIG as V, AgentOnlineService as a, ageFromDob as b, callerMetaLine as c, historyResultChips as d, historyResolutionLabel as e, EdButtonComponent as f, EdSkeletonComponent as g, historyResolution as h, isUnknownCaller as i, toE164Phone as j, resolveToolKey as k, resolveToolDisplayName as l, toolEventTrackKey as m, DEFAULT_PAGE_SIZE as n, totalPages as o, EdIconButtonComponent as p, activityTypeLabel as q, resultChipIcon as r, ViewportPortalDirective as s, triggerBlobDownload as t, initialsFromName as u, DEFAULT_PLACEHOLDERS as v, EdsAppShellComponent as w, EdsBadgeComponent as x, EdsButtonComponent as y, EdsRouteProgressComponent as z };
|
|
6483
|
-
//# sourceMappingURL=edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-
|
|
6693
|
+
//# sourceMappingURL=edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-CabSa0_n.mjs.map
|