-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-simple-modify-default-queries-mdx-e262b7eaa22d81dcfd4c.js
2 lines (2 loc) · 8.2 KB
/
component---src-pages-simple-modify-default-queries-mdx-e262b7eaa22d81dcfd4c.js
1
2
"use strict";(self.webpackChunkmas_playbook=self.webpackChunkmas_playbook||[]).push([[228],{3624:function(e,t,a){a.d(t,{Z:function(){return v}});var n=a(7294),i=a(8650),o=a.n(i),l=a(1597),r=a(811),d=a(87),s=a(5900),c=a.n(s),m=function(e){var t,a=e.title,i=e.theme,o=e.tabs,l=void 0===o?[]:o;return n.createElement("div",{className:c()("PageHeader-module--page-header--NqfPe",(t={},t["PageHeader-module--with-tabs--vbQ-W"]=l.length,t["PageHeader-module--dark-mode--WCeH8"]="dark"===i,t))},n.createElement("div",{className:"bx--grid"},n.createElement("div",{className:"bx--row"},n.createElement("div",{className:"bx--col-lg-12"},n.createElement("h1",{id:"page-title",className:"PageHeader-module--text--Er2EO"},a)))))},u=function(e){var t=e.relativePagePath,a=e.repository,i=(0,l.useStaticQuery)("1364590287").site.siteMetadata.repository,o=a||i,r=o.baseUrl,d=o.subDirectory,s=r+"/edit/"+o.branch+d+"/src/pages"+t;return r?n.createElement("div",{className:"bx--row EditLink-module--row--BEmSX"},n.createElement("div",{className:"bx--col"},n.createElement("a",{className:"EditLink-module--link--IDrl1",href:s},"Edit this page on GitHub"))):null},p=a(4703),g=a(1721),h=function(e){function t(){return e.apply(this,arguments)||this}return(0,g.Z)(t,e),t.prototype.render=function(){var e=this.props,t=e.title,a=e.tabs,i=e.slug,r=i.split("/").filter(Boolean).slice(-1)[0],d=a.map((function(e){var t,a=o()(e,{lower:!0,strict:!0}),d=a===r,s=new RegExp(r+"/?(#.*)?$"),m=i.replace(s,a);return n.createElement("li",{key:e,className:c()((t={},t["PageTabs-module--selected-item--aBB0K"]=d,t),"PageTabs-module--list-item--024o6")},n.createElement(l.Link,{className:"PageTabs-module--link--Kz-7R",to:""+m},e))}));return n.createElement("div",{className:"PageTabs-module--tabs-container--Cdfzw"},n.createElement("div",{className:"bx--grid"},n.createElement("div",{className:"bx--row"},n.createElement("div",{className:"bx--col-lg-12 bx--col-no-gutter"},n.createElement("nav",{"aria-label":t},n.createElement("ul",{className:"PageTabs-module--list--xLqxG"},d))))))},t}(n.Component),b=h,y=a(7296),w=a(5387),f=a(3732),k=function(e){var t=e.date,a=new Date(t);return t?n.createElement(f.X2,{className:"last-modified-date-module--row--XJoYQ"},n.createElement(f.sg,null,n.createElement("div",{className:"last-modified-date-module--text--ogPQF"},"Page last updated: ",a.toLocaleDateString("en-GB",{day:"2-digit",year:"numeric",month:"long"})))):null},v=function(e){var t=e.pageContext,a=e.children,i=e.location,s=e.Title,c=t.frontmatter,g=void 0===c?{}:c,h=t.relativePagePath,f=t.titleType,v=g.tabs,x=g.title,N=g.theme,E=g.description,A=g.keywords,S=g.date,C=(0,w.Z)().interiorTheme,P=(0,l.useStaticQuery)("2456312558").site.pathPrefix,T=P?i.pathname.replace(P,""):i.pathname,D=v?T.split("/").filter(Boolean).slice(-1)[0]||o()(v[0],{lower:!0}):"",R=N||C;return n.createElement(d.Z,{tabs:v,homepage:!1,theme:R,pageTitle:x,pageDescription:E,pageKeywords:A,titleType:f},n.createElement(m,{title:s?n.createElement(s,null):x,label:"label",tabs:v,theme:R}),v&&n.createElement(b,{title:x,slug:T,tabs:v,currentTab:D}),n.createElement(y.Z,{padded:!0},a,n.createElement(u,{relativePagePath:h}),n.createElement(k,{date:S})),n.createElement(p.Z,{pageContext:t,location:i,slug:T,tabs:v,currentTab:D}),n.createElement(r.Z,null))}},9225:function(e,t,a){a.r(t),a.d(t,{_frontmatter:function(){return r},default:function(){return c}});var n=a(3366),i=(a(7294),a(4983)),o=a(3624),l=["components"],r={},d={_frontmatter:r},s=o.Z;function c(e){var t=e.components,a=(0,n.Z)(e,l);return(0,i.kt)(s,Object.assign({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",null,"About this task"),(0,i.kt)("p",null,"This guide walks you through changing the default queries for the Techmobile application."),(0,i.kt)("h2",null,"Procedure"),(0,i.kt)("h3",null,"Step 1: Create and/or take the query name you would like to use"),(0,i.kt)("span",{className:"gatsby-resp-image-wrapper",style:{position:"relative",display:"block",marginLeft:"auto",marginRight:"auto",maxWidth:"1059px"}},"\n ",(0,i.kt)("span",{parentName:"span",className:"gatsby-resp-image-background-image",style:{paddingBottom:"71.875%",position:"relative",bottom:"0",left:"0",backgroundImage:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAACRklEQVQ4y42SW6/bNgyA/c/3a/Za7KmvKwq0QNGHYT0bDpLjJL5bvtuJJd8kfYOV4PSCYSuBDxRFmiJper9/+Mzz8cTz8UyclyR55fT9/O/6NS4ribOCMBWIquX9pz/wurZByRE53lBSUtcVQ9+xzDN913IdBmdfh56h753d953z6W3lW9lzef7pRBRFhGFIEATkRUmY5NR1Q13XlFWNKGtyUZILQZIkRHFCVTd0XUvXdTRNS9X0HPwLnhCCaZ7Jsow4jomimGEYmKYJpRRKTQ+UuyvLkjRNnd31A3meM44j07y4xzxRlBhrnePl5cXpZVlY1411Xb9Da01RlmR5jtGaZlCManbxatFkaYpXlhVYSxyGPH35080Ja9x8zLahHSt6XbFGk2cpSRy5mKqTKDWzrStyWimEwIuLmm61HKKUJ//CX6eArL/RTBuVnKmn1Z13usXgZwWHKKNbNGGnKMbFxRRSE2YCT1QNg5o5ngOOl4Cn5wP5PnC5IDfDbGDa0dbperg55KYZpo1x1chVowwk+Z5Q5G4F9nKbuiK4nDn5PueT79Zg94WXC+fTieB8pm0a1/o+Q6t3vb2uj2u5bVu0MW7/RNnQDKPbx/3P3W47twcjUkqstQ+4A87eRYgCb6/Amo22bRiGq/vj/yVfE94xxrqCdtk3xHvz7plffv0bP7u6y91pjMFa8/jAvPJjMvv6+F3nWYZ3uKTE9Yyct29cPy83tdGPiztHSYZXV+WjFfNdNf+H1vc2335O+e1jhJwNfpDwD1M+LrS/CCOuAAAAAElFTkSuQmCC')",backgroundSize:"cover",display:"block"}}),"\n ",(0,i.kt)("img",{parentName:"span",className:"gatsby-resp-image-image",alt:"mxapiwodetail custom query definition",title:"mxapiwodetail custom query definition",src:"/configuration-practices-documentation/static/58d66bca00137a552a65e7ff0524d5b7/34bdb/closed-custom-query-definition.png",srcSet:["/configuration-practices-documentation/static/58d66bca00137a552a65e7ff0524d5b7/7fc1e/closed-custom-query-definition.png 288w","/configuration-practices-documentation/static/58d66bca00137a552a65e7ff0524d5b7/a5df1/closed-custom-query-definition.png 576w","/configuration-practices-documentation/static/58d66bca00137a552a65e7ff0524d5b7/34bdb/closed-custom-query-definition.png 1059w"],sizes:"(max-width: 1059px) 100vw, 1059px",style:{width:"100%",height:"100%",margin:"0",verticalAlign:"middle",position:"absolute",top:"0",left:"0"},loading:"lazy",decoding:"async"}),"\n "),(0,i.kt)("h3",null,"Step 2: Associating the query name to a datasource. You can create one but typically the main list already has a main datasource and to reuse the same object structure in the same page we use ",(0,i.kt)("inlineCode",{parentName:"h3"},"maximo-datasource-override"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},' <maximo-datasource-override id="closedWODS" saved-query="MYCUSTOMQUERY"/>\n')),(0,i.kt)("h3",null,"Step 3: Create an item in dropdown to list the new option. To find the ‘out of the box’ queries available in the Techmobile home page dropdown menu, you can search the app.xml using ‘dropdown-item’ (see below). You can also search by the value displayed in the dropdown when you run the application, in techmobile the dropdown has ID ",(0,i.kt)("inlineCode",{parentName:"h3"},"rzvz4"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},' <dropdown slot="dropdown" background-color="white" selected-item="{page.state.selectedDS}" id="rzvz4" on-change="loadWOListData" hide-unselected-placeholder="true">\n <dropdown-item value="todaywoassignedDS" text="Assigned work" id="njkmd"/>\n <dropdown-item value="pmduewolistDS" text="PMs due this week" id="jxr9k"/>\n <dropdown-item value="myworkDS" text="Work created by me" hidden="{app.device.isMaximoMobile}" id="wqadv"/>\n <dropdown-item value="myworkCreatedLocally" text="Work created on device" hidden="{!app.device.isMaximoMobile}" id="wgbb8"/>\n <dropdown-item value="myWorkOrder" sigoption="{`${app.state.woOSName}.uxtechlist`}" text="My work order" id="d3v_7"/>\n <dropdown-item value="completedCloseDS" text="Work order history" id="qebv2"/>\n <state name="selectedDS" value="closedWODS" type="string" id="py7q_"/>\n </dropdown>\n')),(0,i.kt)("h3",null,"Step 4: Set the datasource with the desired default query as value of the page state. Typically that is how most of the apps work, in techmobile the id of this state is ",(0,i.kt)("inlineCode",{parentName:"h3"},"py7q_"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},' <state name="selectedDS" value="closedWODS" type="string" id="py7q_"/>\n')))}c.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-simple-modify-default-queries-mdx-e262b7eaa22d81dcfd4c.js.map