Drawers can be added in any mystique components by modifying the mystique manifest.
The drawer’s custom data source can be defined via queries and variables.
Steps
Step 1
Add the fc.drawer.button component to pages section of `fc.mystique.manifest.oms.fragment.ordermanagement` and/or `fc.mystique.manifest.oms.fragment.ordermanagement.mixedbasket`manifest fragments:
Initial Manifest
Result
The Configurable drawer could be placed in multiple Mystique components, such as:
Add descendants to `fc.drawer.button` component in `fc.mystique.manifest.oms.fragment.ordermanagement` and/or `fc.mystique.manifest.oms.fragment.ordermanagement.mixedbasket`manifest fragments:
Initial Manifest
Result
Any Mystique components could be placed in the Configurable drawer, for example:
1"pages":[2{3"type":"page",4"path":"orders",5"component":"fc.page",6"data":{7"query":parse(gql`query($orders_first:Int){orders(first: $orders_first){ edges{ node { id ref retailer{id tradingName} type status retailer{id} workflowRef workflowVersion totalPrice totalTaxPrice items { edges { node { currency }}} createdOn customer{id firstName lastName }}}}}`),8"variables":{9"orders_first":10010}11},12"nav":{13"label":"i18n:fc.om.orders.index.nav",14"icon":"library_books"15},16"props":{17"title":"i18n:fc.om.orders.index.title"18},19"descendants":[20{21"component":"fc.drawer.button",22"props":{23"label":"button label",24"color":"primary",25"title":"Drawer title",26"descendants":[27// The list of existing components to be displayed as children of drawer28]29}30},31]32},33]
1"pages":[2{3"type":"page",4"path":"orders",5"component":"fc.page",6"data":{7"query": parse(gql`query($orders_first: Int) { orders(first: $orders_first) { edges{ node { id ref retailer{id tradingName} type status retailer{id} workflowRef workflowVersion totalPrice totalTaxPrice items { edges { node { currency }}} createdOn customer{id firstName lastName }}}}}`),8"variables":{9"orders_first":10010}11},12"nav":{13"label":"i18n:fc.om.orders.index.nav",14"icon":"library_books"15},16"props":{17"title":"i18n:fc.om.orders.index.title"18},19"descendants":[20{21"component":"fc.drawer.button",22"props":{23"label":"button label",24"color":"primary",25"title":"Drawer title",26"descendants":[27{28"component":"fc.mystique.collapsible.text",29"props":{30// configurable drawer datasource is limited by Page parent component datasource (orders are available - line 7)31"text":"{{orders.edges.0.node.retailer.tradingName}}",32"charCutoff":5033}34}35]36}37},38{39"component":"fc.list",40"props":{41"defaultPageSize":100,42"dataSource":"orders.edges.0.node.items",43"attributes":[44{45"label":"i18n:fc.om.orders.detail.list.orderItems.column.ref.heading",46"type":"component",47"options":{48"component":"fc.drawer.button",49"props":{50"label":"empty",51"color":"primary",52"title":"Empty drawer title",53"descendants":[54// configurable drawer datasource is limited by List parent component datasource (only items are available - line 42)55]56}57}58},59]60}61}62]63},64]
datasource
What can I do to redefine the datasource for the Configurable drawer?Query and variables properties to be used to define a custom datasource for the Configurable drawer.