00:00:14.207 --> 00:00:16.938 Reason for this video can be used for probably different
00:00:16.938 --> 00:00:17.417 scenarios.
00:00:17.427 --> 00:00:20.861 However, it'll likely be linked to a lot of architecture tickets
00:00:20.861 --> 00:00:23.873 or user stories that you're working in, so this video is
00:00:23.873 --> 00:00:27.149 designed to just kind of get you up and running with a custom
00:00:27.149 --> 00:00:30.320 dashboard route and ultimately create the component to that
00:00:30.320 --> 00:00:30.637 route.
00:00:31.607 --> 00:00:34.866 So we can kind of speed through it a little bit quicker instead
00:00:34.866 --> 00:00:37.972 of just writing down the same instructions over and over for
00:00:37.972 --> 00:00:39.347 multiple different tickets.
00:00:41.747 --> 00:00:45.662 So the the first thing to go over is the custom dashboard
00:00:45.662 --> 00:00:46.877 route app setting.
00:00:47.087 --> 00:00:50.741 There's a specific app setting called Clarity Dot dashboard dot
00:00:50.741 --> 00:00:54.510 customer routes which allows you to put the custom routes in this
00:00:54.510 --> 00:00:58.050 app setting, not to get too off topic, but a lot of dashboard
00:00:58.050 --> 00:01:00.677 routes are enabled by their own app settings.
00:01:00.687 --> 00:01:03.762 As you can see here, so we have clarity dashboard, route
00:01:03.762 --> 00:01:05.057 auctions 1 enabled true.
00:01:05.407 --> 00:01:08.821 You can do it that way and ultimately hard code the code in
00:01:08.821 --> 00:01:12.234 the back end, but the majority of the time custom dashboard
00:01:12.234 --> 00:01:15.307 routes we don't need to hard code that into core SEF.
00:01:15.317 --> 00:01:18.610 We can just do it right in app setting like we did here, so I'm
00:01:18.610 --> 00:01:21.492 just going to kind of walk through how this app setting
00:01:21.492 --> 00:01:22.727 structured a little bit.
00:01:24.077 --> 00:01:27.787 So you'll you'll add the key here.
00:01:27.797 --> 00:01:32.538 Clarity Dashboard dot route dot custom routes and this is the
00:01:32.538 --> 00:01:34.527 format for a single route.
00:01:34.537 --> 00:01:37.573 Now, if you were to add another route, you would essentially put
00:01:37.573 --> 00:01:37.947 a comma.
00:01:39.077 --> 00:01:40.677 You know duplicate this.
00:01:44.027 --> 00:01:45.557 And now you have two rounds.
00:01:45.667 --> 00:01:49.378 Obviously you want to change the information to be something
00:01:49.378 --> 00:01:52.237 different, but here we just have a single one.
00:01:53.137 --> 00:01:57.208 One of the things to know is you do need to have the comma at the
00:01:57.208 --> 00:02:01.155 beginning of the string and the strings inside the outer string
00:02:01.155 --> 00:02:02.697 need to be single quotes.
00:02:03.087 --> 00:02:08.086 So right here you have the name of the root which is custom Row
00:02:08.086 --> 00:02:08.867 title key.
00:02:08.917 --> 00:02:12.276 This will be a translation and as you'll see on my page, it's
00:02:12.276 --> 00:02:15.202 not a I don't have the translation in, but ultimately
00:02:15.202 --> 00:02:18.507 you would add this translation to your database like normal.
00:02:19.137 --> 00:02:23.257 Each ref is going to be the URL for the root and then enabled
00:02:23.257 --> 00:02:26.247 here we'll hard code true and then order is.
00:02:26.257 --> 00:02:28.766 Where is this going to be ordered in relation to the other
00:02:28.766 --> 00:02:29.447 dashboard links?
00:02:29.457 --> 00:02:32.371 I put 300, which is a pretty high number, so this will likely
00:02:32.371 --> 00:02:35.097 be the last link that we see at the bottom of the screen.
00:02:36.147 --> 00:02:41.455 Umm, a lot of the times and the tickets I'm referencing the
00:02:41.455 --> 00:02:43.047 require roles any.
00:02:43.877 --> 00:02:45.947 I believe that's the the wording for it.
00:02:46.097 --> 00:02:52.575 So essentially you would put something here like require,
00:02:52.575 --> 00:02:55.367 roles, any uh as the key.
00:02:55.437 --> 00:02:58.195 Then you put a custom string in there and you could do something
00:02:58.195 --> 00:02:58.407 like.
00:03:01.557 --> 00:03:03.387 CLI clinician.
00:03:06.587 --> 00:03:10.068 And what that would do is require the user to have the
00:03:10.068 --> 00:03:12.917 clinician role in order to see this account.
00:03:13.227 --> 00:03:14.027 To see this route.
00:03:14.567 --> 00:03:18.064 So just so you know, there are additional key value pairs you
00:03:18.064 --> 00:03:18.967 can put in here.
00:03:18.977 --> 00:03:23.057 You can see those by looking at the dashboard custom route
00:03:23.057 --> 00:03:27.413 interface in the front end in the back end, but just know that
00:03:27.413 --> 00:03:31.147 if you're requiring roles that would go here like so.
00:03:34.457 --> 00:03:38.613 So with that said, once you have the app setting in, you can go
00:03:38.613 --> 00:03:42.703 ahead and actually create the custom component that's gonna be
00:03:42.703 --> 00:03:44.067 mapped to this route.
00:03:44.077 --> 00:03:47.013 So just creating the route will put the link on the dashboard,
00:03:47.013 --> 00:03:49.995 but ultimately you're going to want some type of component when
00:03:49.995 --> 00:03:50.927 you go to that road.
00:03:51.667 --> 00:03:53.837 And so here I just created a really basic one.
00:03:53.847 --> 00:03:57.379 It's also called customer out and we're just exporting custom
00:03:57.379 --> 00:04:00.626 route and returning a did that just says custom route is
00:04:00.626 --> 00:04:03.987 working so all your logic could probably go in this parent
00:04:03.987 --> 00:04:07.177 component and then children components from here under.
00:04:09.447 --> 00:04:12.865 So once you get your component created, you would then go to
00:04:12.865 --> 00:04:16.283 Dashboard tab components and in here this is what's actually
00:04:16.283 --> 00:04:19.590 gonna map that this component here to the component map to
00:04:19.590 --> 00:04:21.327 render it inside the dashboard.
00:04:22.627 --> 00:04:26.341 So you would start by importing that component like we're doing
00:04:26.341 --> 00:04:29.997 online 30 and then ultimately right here is a components list.
00:04:30.687 --> 00:04:34.388 These are in alphabetical order, and as you can see we just have
00:04:34.388 --> 00:04:38.089 a key value pair of custom route component custom route and this
00:04:38.089 --> 00:04:39.627 is all coming from up here.
00:04:39.637 --> 00:04:40.807 What we're importing from here?
00:04:42.477 --> 00:04:47.552 I don't need to do anything and use dashboard links and so yeah,
00:04:47.552 --> 00:04:49.817 I mean that's pretty much it.
00:04:50.207 --> 00:04:52.477 I want to try and make this video pretty short and concise.
00:04:52.487 --> 00:04:56.494 I'll just show this on the front end and as you can see, we have
00:04:56.494 --> 00:05:00.378 this is a local client project, but if you come down here, you
00:05:00.378 --> 00:05:04.200 can go to customer route and you can see that dev and text is
00:05:04.200 --> 00:05:04.817 rendering.
00:05:04.827 --> 00:05:08.916 Here you can go between dashboard and like I said the
00:05:08.916 --> 00:05:11.037 sort order for this was 300.
00:05:11.047 --> 00:05:12.347 So that's why it's all the way at the bottom.
00:05:13.017 --> 00:05:13.607 Umm.
00:05:13.797 --> 00:05:17.571 But hopefully this will be abuse in many of the tickets and if
00:05:17.571 --> 00:05:20.507 you have any questions just let me know. Thanks.