UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

37 lines (36 loc) 1.56 kB
/** * DevExtreme (esm/__internal/scheduler/appointments/appointment/agenda_appointment.js) * Version: 26.1.4 * Build date: Fri Jul 24 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import $ from "../../../../core/renderer"; import { APPOINTMENT_CONTENT_CLASSES } from "../../classes"; import { Appointment } from "./m_appointment"; export class AgendaAppointment extends Appointment { get coloredElement() { return this.$element().find(`.${APPOINTMENT_CONTENT_CLASSES.AGENDA_MARKER}`) } _renderResourceList() { const resourceManager = this.option("getResourceManager")(); void resourceManager.getAppointmentResourcesValues(this.rawAppointment).then(list => { const parent = this.$element().find(`.${APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_CONTENT_DETAILS}`); const container = $("<div>").addClass(APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST).appendTo(parent); list.forEach(item => { const itemContainer = $("<div>").addClass(APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST_ITEM).appendTo(container); $("<div>").text(`${item.label}:`).appendTo(itemContainer); $("<div>").addClass(APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST_ITEM_VALUE).text(item.values.join(", ")).appendTo(itemContainer) }) }) } _render() { super._render(); this._renderResourceList() } }