diff --git a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Angular/app/app.component.html b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Angular/app/app.component.html
index d8604fd6cba5..6e6a09c9e511 100644
--- a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Angular/app/app.component.html
+++ b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Angular/app/app.component.html
@@ -54,8 +54,8 @@
[colCountByScreen]="{ xs: 3 }"
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/React/App.tsx b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/React/App.tsx
index 6476613b62c4..3f98a1fcbcf4 100644
--- a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/React/App.tsx
+++ b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/React/App.tsx
@@ -69,8 +69,8 @@ const App = () => (
-
-
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/ReactJs/App.js b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/ReactJs/App.js
index 1b6cf72dcde0..4ad2cb8bd73a 100644
--- a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/ReactJs/App.js
+++ b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/ReactJs/App.js
@@ -70,8 +70,8 @@ const App = () => (
colCountByScreen={{ xs: 3 }}
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Vue/App.vue b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Vue/App.vue
index 4ebb89b6ca2d..f2e7537607a5 100644
--- a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Vue/App.vue
+++ b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/Vue/App.vue
@@ -54,8 +54,8 @@
name="priorityIdGroup"
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/jQuery/index.js b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/jQuery/index.js
index d186f0ff8f35..88cdbe281ce6 100644
--- a/apps/demos/Demos/Scheduler/IndividualViewsCustomization/jQuery/index.js
+++ b/apps/demos/Demos/Scheduler/IndividualViewsCustomization/jQuery/index.js
@@ -64,7 +64,7 @@ $(() => {
colCountByScreen: {
xs: 3,
},
- items: ['priorityIdIcon', 'priorityId', 'typeId'],
+ items: ['priorityIdIcon', 'priorityIdEditor', 'typeIdEditor'],
},
],
},
diff --git a/apps/demos/Demos/Scheduler/Resources/Angular/app/app.component.html b/apps/demos/Demos/Scheduler/Resources/Angular/app/app.component.html
index 50dcf9390843..6ebe4a4d5b66 100644
--- a/apps/demos/Demos/Scheduler/Resources/Angular/app/app.component.html
+++ b/apps/demos/Demos/Scheduler/Resources/Angular/app/app.component.html
@@ -47,8 +47,8 @@
[colCountByScreen]="{ xs: 3 }"
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/Resources/React/App.tsx b/apps/demos/Demos/Scheduler/Resources/React/App.tsx
index c35b9f2b5f5d..0125755f0dc7 100644
--- a/apps/demos/Demos/Scheduler/Resources/React/App.tsx
+++ b/apps/demos/Demos/Scheduler/Resources/React/App.tsx
@@ -69,8 +69,8 @@ const App = () => {
-
-
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/Resources/ReactJs/App.js b/apps/demos/Demos/Scheduler/Resources/ReactJs/App.js
index c680aff016ef..984c1afb0811 100644
--- a/apps/demos/Demos/Scheduler/Resources/ReactJs/App.js
+++ b/apps/demos/Demos/Scheduler/Resources/ReactJs/App.js
@@ -65,8 +65,8 @@ const App = () => {
colCountByScreen={{ xs: 3 }}
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/Resources/Vue/App.vue b/apps/demos/Demos/Scheduler/Resources/Vue/App.vue
index 42b7113e75e1..d1adfbc55d9e 100644
--- a/apps/demos/Demos/Scheduler/Resources/Vue/App.vue
+++ b/apps/demos/Demos/Scheduler/Resources/Vue/App.vue
@@ -46,8 +46,8 @@
name="roomIdGroup"
>
-
-
+
+
diff --git a/apps/demos/Demos/Scheduler/Resources/jQuery/index.js b/apps/demos/Demos/Scheduler/Resources/jQuery/index.js
index 857e424c724d..d16f63cefc67 100644
--- a/apps/demos/Demos/Scheduler/Resources/jQuery/index.js
+++ b/apps/demos/Demos/Scheduler/Resources/jQuery/index.js
@@ -45,8 +45,8 @@ $(() => {
},
items: [
'roomIdIcon',
- 'roomId',
- 'priorityId',
+ 'roomIdEditor',
+ 'priorityIdEditor',
],
},
'assigneeIdGroup',
diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts
index 930279cf66ef..0c4216ec7fb3 100644
--- a/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts
+++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts
@@ -1076,29 +1076,15 @@ describe('Appointment Form', () => {
it('should create resourceEditorsGroup when resources have no custom icons', async () => {
const { scheduler, POM } = await createScheduler({
...getDefaultConfig(),
- dataSource: [{
- text: 'Resource test app',
- startDate: new Date(2017, 4, 9, 9, 30),
- endDate: new Date(2017, 4, 9, 11),
- roomId: 1,
- ownerId: 2,
- }],
- resources: [{
- fieldExpr: 'roomId',
- dataSource: [{ text: 'Room 1', id: 1 }, { text: 'Room 2', id: 2 }],
- }, {
- fieldExpr: 'ownerId',
- dataSource: [{ text: 'Owner 1', id: 1 }, { text: 'Owner 2', id: 2 }],
- }],
+ resources: [
+ { fieldExpr: 'roomId' },
+ { fieldExpr: 'ownerId' },
+ ],
});
- const dataSource = (scheduler as any).getDataSource();
- const appointment = dataSource.items()[0];
- scheduler.showAppointmentPopup(appointment);
+ scheduler.showAppointmentPopup();
- const formItems = POM.popup.dxForm.option('items') as FormItem[];
- const mainGroup = formItems.find((item) => item.name === 'mainGroup') as GroupItem;
- const resourcesGroup = mainGroup?.items?.find((item) => item.name === 'resourcesGroup') as GroupItem;
+ const resourcesGroup = POM.popup.dxForm.itemOption('mainGroup.resourcesGroup') as GroupItem;
expect(resourcesGroup).toBeDefined();
expect(resourcesGroup?.items?.length).toBe(2);
@@ -1106,14 +1092,17 @@ describe('Appointment Form', () => {
expect(resourcesGroup?.items).toEqual(
expect.arrayContaining([
expect.objectContaining({
- name: 'resourcesGroupContent',
+ name: 'resourcesGroupIcon',
+ }),
+ expect.objectContaining({
+ name: 'resourceEditorsGroup',
itemType: 'group',
items: expect.arrayContaining([
expect.objectContaining({
- name: 'roomId',
+ name: 'roomIdEditor',
}),
expect.objectContaining({
- name: 'ownerId',
+ name: 'ownerIdEditor',
}),
]),
}),
@@ -1124,34 +1113,15 @@ describe('Appointment Form', () => {
it('should create individual resource groups when resources have custom icons', async () => {
const { scheduler, POM } = await createScheduler({
...getDefaultConfig(),
- dataSource: [{
- text: 'Resource test app',
- startDate: new Date(2017, 4, 9, 9, 30),
- endDate: new Date(2017, 4, 9, 11),
- roomId: 1,
- ownerId: 2,
- }],
resources: [
- {
- fieldExpr: 'roomId',
- icon: 'home',
- dataSource: [{ text: 'Room 1', id: 1 }, { text: 'Room 2', id: 2 }],
- },
- {
- fieldExpr: 'ownerId',
- icon: 'user',
- dataSource: [{ text: 'Owner 1', id: 1 }, { text: 'Owner 2', id: 2 }],
- },
+ { fieldExpr: 'roomId', icon: 'home' },
+ { fieldExpr: 'ownerId', icon: 'user' },
],
});
- const dataSource = (scheduler as any).getDataSource();
- const appointment = dataSource.items()[0];
- scheduler.showAppointmentPopup(appointment);
+ scheduler.showAppointmentPopup();
- const formItems = POM.popup.dxForm.option('items') as FormItem[];
- const mainGroup = formItems.find((item) => item.name === 'mainGroup') as GroupItem;
- const resourcesGroup = mainGroup?.items?.find((item) => item.name === 'resourcesGroup') as GroupItem;
+ const resourcesGroup = POM.popup.dxForm.itemOption('mainGroup.resourcesGroup') as GroupItem;
expect(resourcesGroup).toBeDefined();
expect(resourcesGroup?.items?.length).toBe(2);
@@ -1163,10 +1133,10 @@ describe('Appointment Form', () => {
itemType: 'group',
items: expect.arrayContaining([
expect.objectContaining({
- name: 'roomId',
+ name: 'roomIdIcon',
}),
expect.objectContaining({
- name: 'roomIdIcon',
+ name: 'roomIdEditor',
}),
]),
}),
@@ -1175,10 +1145,10 @@ describe('Appointment Form', () => {
itemType: 'group',
items: expect.arrayContaining([
expect.objectContaining({
- name: 'ownerId',
+ name: 'ownerIdIcon',
}),
expect.objectContaining({
- name: 'ownerIdIcon',
+ name: 'ownerIdEditor',
}),
]),
}),
diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts
index 76a7c57b7941..dc44f0c7be9a 100644
--- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts
+++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts
@@ -114,6 +114,7 @@ const DATE_OPTIONS_GROUP_NAME = 'dateOptionsGroup';
const START_DATE_GROUP_NAME = 'startDateGroup';
const END_DATE_GROUP_NAME = 'endDateGroup';
const RESOURCES_GROUP_NAME = 'resourcesGroup';
+const RESOURCE_EDITORS_GROUP_NAME = 'resourceEditorsGroup';
const SUBJECT_GROUP_NAME = 'subjectGroup';
const REPEAT_GROUP_NAME = 'repeatGroup';
const DESCRIPTION_GROUP_NAME = 'descriptionGroup';
@@ -134,6 +135,7 @@ const END_DATE_TIMEZONE_EDITOR_NAME = 'endDateTimeZoneEditor';
const SUBJECT_ICON_NAME = 'subjectIcon';
const DATE_ICON_NAME = 'dateIcon';
const REPEAT_ICON_NAME = 'repeatIcon';
+const RESOURCES_GROUP_ICON_NAME = 'resourcesGroupIcon';
const DESCRIPTION_ICON_NAME = 'descriptionIcon';
export class AppointmentForm {
@@ -749,12 +751,13 @@ export class AppointmentForm {
let resourcesItems: FormItem[] = resourcesLoaders.map((resourceLoader) => {
const { dataSource, dataAccessor } = resourceLoader;
const dataField = resourceLoader.resourceIndex;
+ const name = `${dataField}Editor`;
const label = resourceLoader.resourceName ?? dataField;
const editorType = resourceLoader.allowMultiple ? 'dxTagBox' : 'dxSelectBox';
return {
itemType: 'simple',
- name: dataField,
+ name,
dataField,
label: { text: label },
colSpan: 1,
@@ -781,13 +784,13 @@ export class AppointmentForm {
cssClass: `${CLASSES.resourcesGroup} ${CLASSES.groupWithIcon}`,
items: [
{
- name: `${RESOURCES_GROUP_NAME}Icon`,
+ name: RESOURCES_GROUP_ICON_NAME,
colSpan: 1,
cssClass: `${CLASSES.formIcon} ${CLASSES.defaultResourceIcon}`,
template: createFormIconTemplate('addcircleoutline'),
},
{
- name: `${RESOURCES_GROUP_NAME}Content`,
+ name: RESOURCE_EDITORS_GROUP_NAME,
itemType: 'group',
colSpan: 1,
items: resourcesItems,