Premium support for our pure JavaScript UI components


Post by gorakh.nath »

There are two use cases:-

  1. If we are giving image url in resource it should show that image
    {
                    "id": 1,
                    "name": "ArcadyN",
                    "role": "Core developer",
                    "calendar": "day",
                    "image": "https://st2.depositphotos.com/3643473/6206/i/950/depositphotos_62067873-stock-photo-mechanical-engineer-with-a-wrench.jpg"
                },
                {
                    "id": 2,
                    "name": "Dave",
                    "role": "Tech Sales",
                    "calendar": "day",
                    "image": "https://st2.depositphotos.com/3643473/6206/i/950/depositphotos_62067873-stock-photo-mechanical-engineer-with-a-wrench.jpg"
                },
                {
                    "id": 3,
                    "name": "Henrik",
                    "role": "Sales",
                    "image": ""
                },
  2. If the image is set as "" as we can see above then I should able to set the default images for that technician.
    Right now both is not working , I have attached the application for reference, please help me with this.
Attachments
defaultImage.zip
(2.98 MiB) Downloaded 66 times
Screenshot 2021-07-21 at 8.05.48 PM.png
Screenshot 2021-07-21 at 8.05.48 PM.png (204 KiB) Viewed 243 times

Post by mats »

  1. Please study the docs: https://bryntum.com/docs/scheduler/#Scheduler/column/ResourceInfoColumn and ResourceModel.

If you want to use absolute path, use https://bryntum.com/docs/scheduler/#Scheduler/model/ResourceModel#field-imageUrl field

  1. A model field can have a https://bryntum.com/docs/scheduler/#Core/data/field/DataField#config-defaultValue so just set that to your desired default. Or add a custom getter to your own ResourceModel
get imageUrl() {
}

Post Reply