Lesson 14: Add and Design Event Card Component

491 views

Welcome to Lesson 14 of our SmartUX Demo Application series. This guide will walk you through the process of adding and designing an Event Card Component in the Training. Follow these engaging instructions to create a visually appealing and functional event card for your platform.

Upon successful completion of the specified steps, the result will reflect the desired outcome as shown in the image below:

 

1. Add Component to SmartUX

  • Click on the Add Component.
  • This will open a Select Program window with a List of Web Client Programs from Magic xpa.

Add Component to SmartUX

 

2. Select a Program for the Event Card

  • As we are adding a component for Event Card, Select the EventCard Program.
  • Click on the Next button.
  • This will take you to the Component Template screen.

Select a Program for the Event Card

 

3. Select the Component Template for the EventCard Program

  • Select Blank Template as the Component Template for the “EventCard” program.
  • Click on the Finish button.

Select Component Template for EventCard Program

 

4. Enable Expanded View and View Code for EventCard Component

  • Click on the Expanded View icon to enable Expanded View.
  • Click on the View Code icon to open a section below the Canvas to see the HTML source code of dropped Widgets.

Enable Expanded View and View Code for EventCard Component

 

5. Map Form Name to Container

  • Select the Container widget on the Canvas.
  • Click on the gear icon associated with the Form Name property for mapping.

Map Form Name to Container

 

6. Select Form Name Data Model to Container

  • Here on the Select Data Model window, select “EventCard” Form Data Model.
  • Click on the Save button to map.

Select Form Name Data Model to Container

 

7. Assign Class property to Container

  • In the Class property of Container fill “allSideSpacing-containers”.

Assign Class property to Container

 

8. Drag and Drop Row and assign Class property

  • Drag and drop the Row widget inside the Container.
  • In the Class property of the Row widget fill “smallSpacingBottomOutsideContainer”.

Drag and Drop Row and assign Class property

 

9. Drag and drop Two Columns in a Row

  • Inside the last dropped Row widget drop two columns one after another.

Drag and drop Two Columns in Row

 

10. Add Heading to the First Column widget

  • Drag and drop the Heading H4 inside the first Column widget.
  • In the properties sheet of the Heading H4 widget, input “Event Information” in the Text property.
  • In the Class property of Heading input “horizontal-line-bottom”.

Add Heading to the First Column widget

 

11. Add Heading to the Second Column widget

  • Drag and drop the Heading H4 inside the second Column widget.
  • In the properties sheet of the Heading H4 widget, input “Attendees” in the Text property.
  • In the Class property of Heading input “horizontal-line-bottom”.

Add Heading to the Second Column widget

 

12. Drag and drop four Row widgets below the Heading Event Information

  • As shown on the screen drag and drop the four Row widgets below the “Event Information” Heading inside the first Column.

Drag and drop four Row widgets below the Heading Event Information

 

13. Drag and drop two Row widgets below the Heading Attendees

  • As shown on the screen drag and drop the two Row widgets below the “Attendees” Heading inside the second Column.

Drag and drop two Row widgets below the Heading Attendees

 

14. Drag and drop Columns inside the Rows below Event Information Heading

  • As we dropped Four Rows under the Event Information Heading.
  • Inside these four Rows drag and drop two columns for each Row as shown on screen.

Drag and drop Columns inside the Rows below Event Information Heading

 

15. Drag and drop Columns inside the Rows below Attendees Heading

  • As we dropped Two Rows under the Attendees Heading.
  • Inside these two Rows drag and drop one column for each Row as shown on screen.

Drag and drop Columns inside the Rows below Attendees Heading

 

16. Drag and drop the Row inside the Form Container

  • Drag and drop the Row widget inside the Form Container.
  • Below is the first Row as shown on the screen.
  • In the Properties Sheet of the Row widget, fill in the Class property with “horizontal-line-bottom”.

Drag and drop the Row inside the Form Container

 

17. Drag and drop the Column inside the last dropped Row

  • Inside the last dropped Row widget, drop a Column widget.
  • As shown on screen.

Drag and drop the Column inside the last dropped Row

 

18. Drag and drop another Row below the last dropped Row

  • Drag and drop the Row widget below the last dropped Row.
  • Drop it inside the Form Container.

Drag and drop another Row below last dropped Row

 

19. Drag and drop the Column inside the last dropped Row

  • Inside the last dropped Row widget, drop a Column widget.
  • As shown on screen.

Drag and drop the Column inside the last dropped Row

 

20. Drag and drop Input to Event Information first Row First Column

  • Drag and drop the Input widget inside the first Row first Column under the Event Information Heading.
  • In the Properties Sheet of the Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Input to Event Information first Row first Column

 

21. Map Input widget with Event_ID

  • Click on the Event_ID data model to map it with the Input widget.
  • Click on the Save button to confirm mapping.

Map Input widget with Event_ID

 

22. Set properties of Event ID input

  • In the properties sheet of the Input, fill in the Label property with “Event ID” text.
  • In the Display Logic section, change the Appearance property to “Outline”.

Set properties of Event ID input

 

23. Drag and drop Input to Event Information first Row Second Column

  • Drag and drop the Select Input widget inside the first Row second Column under the Event Information Heading.
  • In the Properties Sheet of the Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Input to Event Information first Row second Column

 

24. Map Select Input widget with ComboEventType

  • Click on the ComboEventType data model to map it with the Select Input widget.
  • Click on the Save button to confirm mapping.

Map Select Input widget with ComboEventType

 

25. Set properties for Select Input for Event Type

  • In the properties sheet of the Select Input, fill in the Label property with “Event Type” text.
  • In the Display Logic section, check the Required property.

Set properties for Select Input for Event Type

 

26. Drag and drop Input to Event Information second Row  inside the First Column

  • Drag and drop the Input widget inside the second Row first Column under the Event Information Heading.
  • In the Properties Sheet of the Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Input to Event Information second Row  inside First Column

 

27. Map Input widget with Event_Name

  • Click on the Event_Name data model to map it with the Input widget.
  • Click on the Save button to confirm mapping.

Map Input widget with Event_Name

 

28. Set properties for Input for Event Name

  • In the properties sheet of the Input, fill in the Label property with “Event Name” text.
  • In the Display Logic section, check the Required property.
  • In the Display Logic section, change the Appearance property to “Outline”.

Set properties for Input for Event Name

 

29. Drag and drop Select Input to Event Information second Row inside the Second Column

  • Drag and drop the Select Input widget inside the second Row second Column under the Event Information Heading.
  • In the Properties Sheet of the Select Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Select Input to Event Information second Row inside the Second Column

 

30. Map Select Input widget with ComboEventLocation

  • Click on the ComboEventLocation data model to map it with the Select Input widget.
  • Click on the Save button to confirm mapping.

Map Select Input widget with ComboEventLocation

 

31. Set properties for Select Input for Event Location

  • In the properties sheet of the Select Input, fill in the Label property with “Event Location” text.
  • In the Display Logic section, check the Required property.

Set properties for Select Input for Event Location

 

32. Drag and drop Date to Event Information Third Row inside the First Column

  • Drag and drop the Date widget inside the third Row first Column under the Event Information Heading.
  • Now change Template Variable #Date and its references from the Template section for HTML code.
    • Change [matDatepicker]=”Date” to [matDatepicker]=”StartDate” from Input tag.
    • Change [for]=”Date” to [for]=”StartDate” from mat-datepicker-toggle tag.
    • Change #Date to #StartDate from mat-datepicker tag.
    • Note: This modification includes a unique template variable for each widget to prevent errors or conflicts arising from identical template variable names.
  • In the Properties Sheet of the Date widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Date to Event Information Third Row inside the First Column

 

33. Map Date widget with Start_Date

  • Click on the Start_Date data model to map it with the Date widget.
  • Click on the Save button to confirm mapping.

Map Date widget with Start_Date

 

34. Set properties of Date widget for Start Date

  • In the properties sheet of the Date, fill in the Label property with “Start Date” text.
  • In the Display Logic section, check the Required property.

Set properties of Date widget for Start Date

 

35. Drag and drop Date to Event Information Third Row inside the Second Column

  • Drag and drop the Date widget inside the third Row second Column under the Event Information Heading.
  • Now change Template Variable #Date and its references from the Template section for HTML code.
    • Change [matDatepicker]=”Date” to [matDatepicker]=”EndDate” from Input tag.
    • Change [for]=”Date” to [for]=”EndDate” from mat-datepicker-toggle tag.
    • Change #Date to #EndDate from mat-datepicker tag.
    • Note: This modification includes a unique template variable for each widget to prevent errors or conflicts arising from identical template variable names.
  • In the Properties Sheet of the Date widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Date to Event Information Third Row inside the Second Column

 

36. Map Date widget with End_Date

  • Click on the End_Date data model to map it with the Date widget.
  • Click on the Save button to confirm mapping.

Map Date widget with End_Date

 

37. Set properties of Date widget for End Date

  • In the properties sheet of the Date, fill in the Label property with “End Date” text.
  • In the Display Logic section, check the Required property.

Set properties of Date widget for End Date

 

38. Drag and drop the Time widget to Event Information Fourth Row inside the First Column

  • Drag and drop the Time widget inside the fourth Row first Column under the Event Information Heading.
  • In the Properties Sheet of the Time widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop Time widget to Event Information Fourth Row inside the First Column

 

39. Map Date widget with EventStartTime

  • Click on the EventStartTime data model to map it with the Time widget.
  • Click on the Save button to confirm mapping.

Map Date widget with EventStartTime

 

40. Set properties of the Time widget for Start Time

  • In the properties sheet of the Date, fill in the Label property with “Start Time” text.
  • In the Display Logic section, change the Appearance to Outline.
  • Check the Required property.

Set properties of Time widget for Start Time

41. Drag and drop the Time widget to Event Information Fourth Row inside the Second Column

  • Drag and drop the Time widget inside the fourth Row second Column under the Event Information Heading.
  • In the Properties Sheet of the Time widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop the Time widget to Event Information Fourth Row inside the Second Column

 

42. Map Date widget with Event_Information_End_Time

  • Click on the Event_Information_End_Time data model to map it with the Time widget.
  • Click on the Save button to confirm mapping.

Map Date widget with Event_Information_End_Time

 

43. Set properties of the Time widget for End Time

  • In the properties sheet of the Date, fill in the Label property with “End Time” text.
  • In the Display Logic section, change the Appearance to Outline.
  • Check the Required property.

Set properties of Time widget for End Time

 

44. Drag and drop the Input widget to Attendees First Row inside the First Column

  • Drag and drop the Input widget inside the First Row first Column under the Attendees Heading.
  • In the Properties Sheet of the Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop the Input widget to Attendees First Row inside the First Column

 

45. Map Input widget with Minimum_Attendees

  • Click on the Minimum_Attendees data model to map it with the Input widget.
  • Click on the Save button to confirm mapping.

Map Input widget with Minimum_Attendees

 

46. Set properties of the Input widget for Minimum Attendees

  • In the properties sheet of the Input, fill in the Label property with “Minimum Attendees” text.
  • In the Display Logic section, check the Required property.
  • Change the Appearance property to Outline.

Set properties of Input widget for Minimum Attendees

 

47. Drag and drop the Input widget to Attendees Second Row inside the First Column

  • Drag and drop the Input widget inside the Second Row first Column under the Attendees Heading.
  • In the Properties Sheet of the Input widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop the Input widget to Attendees Second Row inside the First Column

 

48. Map Input widget with Maximum_Attendees

  • Click on the Maximum_Attendees data model to map it with the Input widget.
  • Click on the Save button to confirm mapping.

Map Input widget with Maximum_Attendees

 

49. Set properties of the Input widget for Maximum Attendees

  • In the properties sheet of the Input, fill in the Label property with “Maximum Attendees” text.
  • In the Display Logic section, check the Required property.
  • Change the Appearance property to Outline.

Set properties of Input widget for Maximum Attendees

 

50. Drag and drop the Accordion Container widget inside the Second Row Column inside the Form Container

  • Drag and drop the Accordion Container widget inside the Second Row Column under the Form Container.
  • As shown in the screen.

Drag and drop Accordion Container widget inside the Second Row Column inside the Form Container

 

51. Drag and drop the Accordion Item inside the Accordion Container

  • Drag and drop the Accordion Item inside the Accordion Container.

Drag and drop the Accordion Item inside the Accordion Container

 

52. Change the Label of the Accordion Button

  • Click on the Accordion Button.
  • This is the Accordion Item Header.
  • In the properties sheet of the Accordion Item Header, change the Label property to “Registered Members” under the Labels & Icons section.

Change the Label of Accordion Button

 

53. Drag and drop the Subform widget inside the Accordion Item Container

  • Drag and drop the Subform widget inside the Accordion Item Container.
  • In the properties sheet of the Subform widget, click on the gear icon associated with the Data property.
  • This will open a window to Select Data Model.

Drag and drop the Subform widget inside the Accordion Item Container

 

54. Map Subform widget with SfRegisteredMembers

  • Click on the SfRegisteredMembers data model to map it with the Subform widget.
  • Click on the Save button to confirm mapping.

Map Subform widget with SfRegisteredMembers

 

55. Apply Class property to the Last Row Column in Form Container

  • Click on the Column inside the last Row of the Form container shown on the screen.
  • In the properties sheet of the Column, fill in the Class property with “align-items-end” and “smallSpacingTopOutsideContainer”.

Apply Class property to Last Row Column in Form Container

 

56. Drag and drop the Button widget for Save

  • Drag and drop the Button widget inside the last Row Column.
  • In the properties sheet of the Button widget, Click on the gear icon associated with the Data Mapping property.
  • This will open the window to Select Data Model.

Drag and drop the Button widget for Save

 

57. Map Button widget with btnSave

  • Click on the btnSave data model to map it with the Button widget.
  • Click on the Save button to confirm mapping.

Map Button widget with btnSave

 

58. Set properties of the Button widget for Save operation

  • In the properties sheet of the Button, under the Display Logic section change the Button Style property to Raised Button.
  • In the Disable property fill in the field with “screenFormGroup.invalid”.
  • Under the Label & Icons section, fill in the Label property field with “Save”.
  • Under the Styling Overrides section, fill in the Class property with “savebutton”.

Set properties of Button widget for Save operation

 

59. Drag and drop the Button widget for Cancel

  • Drag and drop another Button widget inside the last Row Column.
  • In the properties sheet of the Button widget, Click on the gear icon associated with the Data Mapping property.
  • This will open the window to Select Data Model.

Drag and drop the Button widget for Cancel

 

60. Map Button widget with btnQuit

  • Click on the btnQuit data model to map it with the Button widget.
  • Click on the Save button to confirm mapping.

Map Button widget with btnQuit

 

61. Set properties of the Button widget for the Cancel operation

  • In the properties sheet of the Button, under the Display Logic section change the Button Style property to Raised Button.
  • Change the Button Color property to “Warn”.
  • Under the Label & Icons section, fill in the Label property field with “Cancel”.

Set properties of Button widget for Cancel operation

 

62. Save all the performed changes

  • Click on the Save button to save all the steps performed during this lesson.

Save all the performed changes

 

63. Component in Canvas

  • Once disable the View Code and Expanded View you will see the the designed component.
  • Let’s switch to Live Preview.

Component in Canvas

 

64. Event Screen

  • From the sidebar navigation menu navigate to Events.
  • Click on the Edit button or Create Event button to see the Event Card component in Live Preview.

Event Screen

 

65. Event Card Screen

  • This is the result of the steps you have performed while designing the component.
  • The Registered Members Accordion does not show anything as we have not added a component for that Subform.
  • Let’s design the Registered Members component next lesson.

Event Card Screen

 

In this guide, you will learn how to efficiently add and design an Event Card component. Follow the detailed instructions to streamline the process effortlessly and enhance your understanding of creating event cards within the application. From setting dates and times to customizing buttons, you now have the tools to create engaging event cards for your training materials. From selecting the EventCard option to filling in event details, this guide ensures you create a comprehensive and visually appealing event card component.

Share this Article

Lesson 14: Add and Design Event Card Component

Or copy link

CONTENTS