00:00:10.405 --> 00:00:14.549 So my process is whenever I'm kind of working on front end and
00:00:14.549 --> 00:00:18.694 like the address book check out or the user dashboard is gonna
00:00:18.694 --> 00:00:22.706 be encountering you know the user addresses and accounts for
00:00:22.706 --> 00:00:26.719 sure. So I always kind of start by just pulling up all three
00:00:26.719 --> 00:00:30.271 tables because these are all kind of interrelated and
00:00:30.271 --> 00:00:32.375 sometimes yeah, it doesn't seem.
00:00:35.085 --> 00:00:38.814 I guess as you would think off, as you would think from the
00:00:38.814 --> 00:00:42.730 naming convention, so a contact for the most part is just kind
00:00:42.730 --> 00:00:46.769 of an address and I'll I'll kind of jump into that. But when you
00:00:46.769 --> 00:00:50.498 register for Seth, what you create and what you log in with
00:00:50.498 --> 00:00:54.414 is a user. So a user is pretty much A1 for one relationship to
00:00:54.414 --> 00:00:56.775 like your actual logging credentials.
00:00:57.855 --> 00:01:01.732 You know, kind of coming through the table, you can see that here
00:01:01.732 --> 00:01:05.490 you get your username, you get your e-mail password and this is
00:01:05.490 --> 00:01:09.249 kind of like the go to like you have one password to log in. So
00:01:09.249 --> 00:01:13.008 a user has one user and I kind of view this I guess is like the
00:01:13.008 --> 00:01:16.414 top level. So this is kind of like the main record that's
00:01:16.414 --> 00:01:20.114 going to allow you to log in and kind of navigate the site and
00:01:20.114 --> 00:01:23.285 everything will kind of stem from this from the user.
00:01:25.035 --> 00:01:31.295 The user is related to a content which you can see here under
00:01:31.295 --> 00:01:32.405 content ID.
00:01:33.175 --> 00:01:36.445 And it also has an account ID.
00:01:37.065 --> 00:01:40.604 So looking at the contact 1st and forgive me because I get
00:01:40.604 --> 00:01:44.502 confused on these also you know clarity is always gonna be using
00:01:44.502 --> 00:01:48.040 number one. I think I kind of mentioned this in one of the
00:01:48.040 --> 00:01:51.938 first stand ups that we had. So it makes it easy to navigate any
00:01:51.938 --> 00:01:55.776 site usually clarity is gonna be user number one account number
00:01:55.776 --> 00:01:57.395 one and contact number one.
00:01:58.535 --> 00:02:02.043 But then so we jump over to contact and kind of look at the
00:02:02.043 --> 00:02:05.726 data here. So we have a custom key first name, last name, full
00:02:05.726 --> 00:02:06.895 name, phone numbers.
00:02:07.895 --> 00:02:11.015 Emails and then an address ID and.
00:02:11.815 --> 00:02:15.241 He kind of jumped around in the address book or the Chico or
00:02:15.241 --> 00:02:18.722 different areas of the site. You know there there's different
00:02:18.722 --> 00:02:22.203 addresses that you can go and submit, like a billing address,
00:02:22.203 --> 00:02:25.741 shipping address. And this is kind of all the information that
00:02:25.741 --> 00:02:29.166 you put in. So every time you enter an address, it creates a
00:02:29.166 --> 00:02:29.615 contact.
00:02:30.455 --> 00:02:31.035 Umm.
00:02:32.075 --> 00:02:35.051 In at links it to the contact information is stored in this
00:02:35.051 --> 00:02:37.579 table and the address information is stored in the
00:02:37.579 --> 00:02:40.505 address table. So I should probably pull up that table. So
00:02:40.505 --> 00:02:41.645 that's kind of the 4th.
00:02:42.515 --> 00:02:46.505 14 to this, the let's go to geography dot S.
00:02:48.195 --> 00:02:52.235 Go ahead and pull this up. So I guess it's really probably this
00:02:52.235 --> 00:02:56.338 teams. And so yeah, if you look at the first one, again #1 super
00:02:56.338 --> 00:03:00.188 user required by custom key name and here you get the street
00:03:00.188 --> 00:03:00.945 information.
00:03:02.345 --> 00:03:07.345 Uh, so Street City postal code, latitude, longitude and.
00:03:08.175 --> 00:03:11.659 Entry ID which are linked to you know the United States for 1/2
00:03:11.659 --> 00:03:13.945 for Canada Region ID which is your state.
00:03:14.505 --> 00:03:18.904 Umm. And this is the actual address itself. So again, users
00:03:18.904 --> 00:03:22.275 tied to a contact contact is tied to address.
00:03:23.455 --> 00:03:27.730 Ohh, but users also tied to an account so as you can see on
00:03:27.730 --> 00:03:30.935 here, this is tied tied to account number 2.
00:03:32.125 --> 00:03:33.745 In an account is.
00:03:34.975 --> 00:03:37.645 In account can hold multiple users.
00:03:39.935 --> 00:03:43.033 So I guess the way to think about it is and I probably will
00:03:43.033 --> 00:03:46.182 still this analogy from David is like when you know probably
00:03:46.182 --> 00:03:49.176 everyone here used Amazon and you know maybe you share an
00:03:49.176 --> 00:03:51.705 account with your significant other or a friend.
00:03:52.305 --> 00:03:55.401 Umm you can both log into the same account, but your
00:03:55.401 --> 00:03:59.022 information and what you order you view when you log in under
00:03:59.022 --> 00:04:02.643 your credentials and you know your partner or friend, they're
00:04:02.643 --> 00:04:06.205 gonna view something different. Different wallets, different
00:04:06.205 --> 00:04:09.885 order history. And while you're under the same account, you're
00:04:09.885 --> 00:04:13.155 gonna view different information when you're logged in.
00:04:13.875 --> 00:04:17.155 Ah, and so the account can hold multiple users.
00:04:17.765 --> 00:04:20.985 Umm, let me see if I can find an example of that.
00:04:22.525 --> 00:04:23.615 Peggle back to.
00:04:22.555 --> 00:04:26.219 It's a it's a many to one relationship where a lot of
00:04:26.219 --> 00:04:30.561 these fields in here are a one to one, right? That's why it's a
00:04:30.561 --> 00:04:34.292 separate table. And for something like product images,
00:04:34.292 --> 00:04:37.005 it's a many to many right you can have.
00:04:37.935 --> 00:04:38.465 Yeah.
00:04:39.255 --> 00:04:42.468 Many products to one image many images to one product, many
00:04:42.468 --> 00:04:44.555 images to separate different products.
00:04:45.055 --> 00:04:47.525 Umm, one of the count. It's the one account.
00:04:45.175 --> 00:04:45.525 You can.
00:04:48.585 --> 00:04:52.177 Could have many users, so one to one, one to many, many to one
00:04:52.177 --> 00:04:52.975 and et cetera.
00:04:54.595 --> 00:04:56.665 And when there's a table in between.
00:04:58.145 --> 00:05:01.857 Like product images or any of the images table that relates in
00:05:01.857 --> 00:05:03.565 between two different tables.
00:05:04.025 --> 00:05:04.555 Umm.
00:05:06.135 --> 00:05:08.725 Where it's not an ID.
00:05:10.285 --> 00:05:13.645 Ohh, where it's not a a foreign key column on either of those
00:05:13.645 --> 00:05:17.005 two tables, it's in between. That's how you can. It's many to
00:05:17.005 --> 00:05:17.655 many, right?
00:05:18.165 --> 00:05:22.669 Umm, it's fully separate where the ID's between each table is.
00:05:22.669 --> 00:05:27.172 On this the interconnected one, the association, so that would
00:05:27.172 --> 00:05:28.315 be many to many.
00:05:30.635 --> 00:05:34.563 The account verse between like users is how you would know that
00:05:34.563 --> 00:05:35.115 it's Umm.
00:05:35.585 --> 00:05:39.864 Uh, many to one, right, because it's there's not a relational
00:05:39.864 --> 00:05:44.350 table in between, but there can be many users that have the same
00:05:44.350 --> 00:05:45.385 account ID. So.
00:05:50.045 --> 00:05:50.885 Yeah. And I think just.
00:05:50.055 --> 00:05:51.165 If that was clear as mud.
00:05:53.625 --> 00:05:56.445 It it gets, it definitely gets a little confused and working
00:05:56.445 --> 00:05:59.402 around here, but like yeah for example here, you know we've got
00:05:59.402 --> 00:06:02.175 two different users that are both under account number one.
00:06:02.855 --> 00:06:03.205 So.
00:06:06.065 --> 00:06:10.017 I guess, Jesse, correct me if I'm wrong, but a good way to sum
00:06:10.017 --> 00:06:12.275 it up is count can have many users.
00:06:12.955 --> 00:06:15.435 Logged in you just have one user.
00:06:16.185 --> 00:06:16.895 And.
00:06:18.475 --> 00:06:21.305 A user can technically have multiple contacts.
00:06:24.065 --> 00:06:27.355 A user can have a lot of uh things in, like an address book.
00:06:27.355 --> 00:06:30.806 Yeah. Yeah. I think they have, like, a primary contact in their
00:06:29.215 --> 00:06:29.535 Right.
00:06:30.806 --> 00:06:34.311 right or something like that. I always forget. But you're right.
00:06:34.311 --> 00:06:37.547 Yeah. No, they can have multiple contacts. Yes. Yeah, yeah.
00:06:35.535 --> 00:06:35.725 Yep.
00:06:37.547 --> 00:06:38.355 Absolutely can.
00:06:37.985 --> 00:06:38.435 And I think.
00:06:39.275 --> 00:06:42.352 Most mostly. Where you gonna see that? In a lot of the outer box
00:06:40.105 --> 00:06:40.275 Yeah.
00:06:42.352 --> 00:06:45.476 data. I think as soon as you log in, there's two addresses. One's
00:06:45.476 --> 00:06:48.268 a bill to address, and then one's a ship to address, which
00:06:48.268 --> 00:06:49.025 you can kind of.
00:06:49.745 --> 00:06:50.995 See from here.
00:06:51.675 --> 00:06:54.939 And this is a lot of just test data that then like shipped to.
00:06:54.939 --> 00:06:57.995 So you can have a billing address and shipping address so.
00:06:59.345 --> 00:07:02.455 Ah, it's any any questions on that?
00:07:03.225 --> 00:07:06.805 Yeah, I have a quick question. So whenever we're going through
00:07:06.805 --> 00:07:08.395 the out of box registration.
00:07:09.885 --> 00:07:15.155 As an end user, we're creating both an account and a contact,
00:07:15.155 --> 00:07:16.515 is that correct?
00:07:19.235 --> 00:07:22.447 When you're registering, registering for the site, it
00:07:22.447 --> 00:07:24.825 creates a user an account in a contact.
00:07:25.525 --> 00:07:26.195 Gotcha.
00:07:26.875 --> 00:07:27.105 Yep.
00:07:27.725 --> 00:07:31.107 So how how would another user like your significant other
00:07:31.107 --> 00:07:34.897 example? How would they register under the same account as a new
00:07:34.897 --> 00:07:38.513 user? Is that something in our out of box functionality or is
00:07:38.513 --> 00:07:39.795 that something custom?
00:07:41.485 --> 00:07:45.960 The request can have an account ID specified. The Register user
00:07:45.960 --> 00:07:50.295 request can have an account ID specified on the default like.
00:07:51.035 --> 00:07:55.244 Customer facing storefront, there's nowhere to enter in or
00:07:55.244 --> 00:07:59.025 even find another account, but in the admin you can.
00:07:59.295 --> 00:08:03.328 Uh, you know, create a user on an account specifying that, but
00:07:59.685 --> 00:07:59.925 Right.
00:08:02.565 --> 00:08:03.175 Gotcha.
00:08:03.328 --> 00:08:07.360 in this out of box in the sense that the API can handle taking
00:08:07.360 --> 00:08:11.137 an account ID and then not creating an account and instead
00:08:11.137 --> 00:08:14.913 just creating the user and associating it to that account.
00:08:14.913 --> 00:08:15.105 So.
00:08:15.755 --> 00:08:16.025 Yeah.
00:08:16.595 --> 00:08:17.265 OK.
00:08:16.695 --> 00:08:17.905 In that sentence out of box.
00:08:18.515 --> 00:08:20.285 Right. That, that's helpful. Thank you.
00:08:21.435 --> 00:08:24.043 But yeah, I I see what you're saying now, Alex. Because you're
00:08:22.545 --> 00:08:22.785 Like.
00:08:24.043 --> 00:08:26.691 like, well, how do you actually get under, like my account when
00:08:26.691 --> 00:08:29.298 you're registering? But yeah, you would need to build out some
00:08:29.298 --> 00:08:30.705 type of UI to select the account.
00:08:31.585 --> 00:08:34.515 OK. And we have that ability and admin it sounds like.
00:08:35.445 --> 00:08:38.541 Yeah, I was gonna just pull this up real quick and kind of walk
00:08:36.475 --> 00:08:36.865 That's right.
00:08:38.541 --> 00:08:41.008 through the admin portion just for a little visual
00:08:41.008 --> 00:08:41.685 understanding.
00:08:49.415 --> 00:08:50.995 And Nick has his hand up.
00:08:52.305 --> 00:08:53.695 Ohh thick what you got?
00:08:55.545 --> 00:08:59.488 Yeah, you said after account registration will create a user,
00:08:59.488 --> 00:09:03.303 a contact and an account, and then if the user updates like
00:09:03.303 --> 00:09:07.372 their address or they add a new address or something like that,
00:09:07.372 --> 00:09:11.187 each time it creates a new record in the database. Is there
00:09:11.187 --> 00:09:15.002 any other way or any other trigger for creating new records
00:09:15.002 --> 00:09:18.817 if they change an address or change their e-mail address or
00:09:18.817 --> 00:09:22.632 their phone number? Does that also create new records every
00:09:22.632 --> 00:09:23.395 single time?
00:09:25.585 --> 00:09:27.125 Well, if you're there, would be.
00:09:26.105 --> 00:09:26.635 Yes.
00:09:28.095 --> 00:09:28.575 What was it?
00:09:29.335 --> 00:09:33.843 Yes, it should. The way that it is designed in our mapping data
00:09:33.843 --> 00:09:38.422 when used because a contact may be associated to something other
00:09:38.422 --> 00:09:42.789 than a a a user, that contact may be associated to some other
00:09:42.789 --> 00:09:47.015 objects. So if a user goes in and they update their address
00:09:47.015 --> 00:09:51.452 information instead of deleting that contact, it will create a
00:09:51.452 --> 00:09:53.565 new contact record every time.
00:09:55.745 --> 00:09:56.155 OK.
00:10:01.605 --> 00:10:05.739 So just coming in like under account to the suggest you know
00:10:05.739 --> 00:10:09.738 account number 11768, you can come in here and you can add
00:10:09.738 --> 00:10:13.939 multiple users to get code. So this would be adding a new one
00:10:13.939 --> 00:10:18.209 creating it from scratch or you can come here and add existing
00:10:18.209 --> 00:10:18.615 users.
00:10:19.545 --> 00:10:21.345 And then you can go ahead and add them to the account.
00:10:23.335 --> 00:10:23.815 Uh.
00:10:25.605 --> 00:10:28.664 And again and then you just kind of again like have your users
00:10:28.664 --> 00:10:28.955 table?
00:10:31.265 --> 00:10:35.271 Here and again, that's kind of the way I think of it as like a
00:10:35.271 --> 00:10:39.149 user's one for one. That's kind of like your master, I guess
00:10:39.149 --> 00:10:42.837 object as you kind of log in, but contacts can be kind of
00:10:42.837 --> 00:10:46.015 transient and an account can hold multiple users.
00:10:50.035 --> 00:10:53.026 I guess the other thing that to quickly touch on, which Jesse
00:10:53.026 --> 00:10:56.066 was mentioning, I think Alex had a question had mentioned this
00:10:56.066 --> 00:10:59.008 too was like there are these relationship tables. So I think
00:10:59.008 --> 00:11:00.455 it comes down account contact.
00:11:01.265 --> 00:11:02.395 Which you can see.
00:11:05.275 --> 00:11:08.984 They're pretty straightforward, but these essentially map a
00:11:08.984 --> 00:11:12.568 master to a slave, and I'm guessing the master's gonna be
00:11:12.568 --> 00:11:16.462 the account and the slave will be the contact. The easiest way
00:11:16.462 --> 00:11:20.356 I typically check these is you know if you're seeing some type
00:11:20.356 --> 00:11:24.249 of foreign key, like a master of slave ID. If you come here to
00:11:24.249 --> 00:11:24.805 the keys.
00:11:25.945 --> 00:11:28.195 You can kind of see where they're going to so.
00:11:28.225 --> 00:11:32.130 The naming convention, as long as you follow the way uh JG laid
00:11:32.130 --> 00:11:35.607 it out, is that when it says something like accounts dot
00:11:35.607 --> 00:11:39.267 account, contact master would be account and slave would be
00:11:39.267 --> 00:11:43.110 contact. It's always the 1st and then the second like that. So
00:11:43.110 --> 00:11:46.953 like product image you know the master would be the product ID
00:11:46.953 --> 00:11:50.491 so master would be product ID and then slave would be the
00:11:50.491 --> 00:11:54.456 images dot image ID. So but yeah I mean there might be some that
00:11:54.456 --> 00:11:58.055 are really confusing on that user role and role user is a.
00:11:58.125 --> 00:12:00.025 Easy example of being weird confusing ones.
00:12:00.825 --> 00:12:04.486 Yeah, you see, uh, hold that up real quick. I think I knew that
00:12:04.486 --> 00:12:07.746 intuitively, although I never actually heard it formally
00:12:07.746 --> 00:12:08.375 verbalized.
00:12:10.155 --> 00:12:11.865 Would it be contact but like?
00:12:12.645 --> 00:12:13.265 Role user.
00:12:14.185 --> 00:12:17.253 Yeah. And then user role, those are really goofy ones. The way
00:12:17.253 --> 00:12:20.321 you were doing it though that I interrupted and shouldn't have
00:12:20.321 --> 00:12:23.535 where you go in and you view the foreign key thing, you're right.
00:12:25.055 --> 00:12:25.445 Is.
00:12:27.705 --> 00:12:31.535 Yeah. So like contact dot user master and then.
00:12:32.515 --> 00:12:34.645 I guess that would be product types, sorry.
00:12:36.815 --> 00:12:38.685 That user role user.
00:12:39.455 --> 00:12:43.385 There we go. Yeah. So user user ID and then ID.
00:12:44.625 --> 00:12:47.105 And I think permissions probably the same too, right?
00:12:49.675 --> 00:12:49.985 It's.
00:12:50.055 --> 00:12:50.515 Permission.
00:12:50.965 --> 00:12:53.657 Those are definitely the weirdest ones. They don't follow
00:12:53.657 --> 00:12:55.235 the pattern that all the rest do.
00:12:53.825 --> 00:12:54.145 Yeah.
00:12:58.125 --> 00:13:01.465 I think permission like context dot permission is his own table
00:13:01.465 --> 00:13:04.752 and then a role permission is a relationship between roles and
00:13:04.752 --> 00:13:06.995 permissions. So I think that one's normal.
00:13:06.205 --> 00:13:06.495 I.
00:13:08.945 --> 00:13:13.236 Yeah, I think that is correct. I usually have good success
00:13:11.415 --> 00:13:11.725 Yeah.
00:13:13.236 --> 00:13:14.035 navigating.
00:13:15.945 --> 00:13:19.288 Yeah, I think the permissions is just yeah, just a raw, they're
00:13:19.288 --> 00:13:22.527 weird because they don't have any fields besides ID and name,
00:13:19.445 --> 00:13:19.935 Yeah.
00:13:22.527 --> 00:13:22.735 but.
00:13:24.865 --> 00:13:25.685 Normal otherwise.
00:13:26.605 --> 00:13:29.595 Yeah, makes a little bit easier to navigate throughout.
00:13:27.535 --> 00:13:27.865 So.
00:13:30.385 --> 00:13:31.255 You're looking in here.
00:13:32.665 --> 00:13:34.645 Yeah, TMK which you got.
00:13:35.775 --> 00:13:39.095 I wasn't can say have an example that will make sense.
00:13:39.815 --> 00:13:41.195 And should be pretty simple.
00:13:39.935 --> 00:13:40.325 Sure.
00:13:44.895 --> 00:13:47.815 I don't know if we want to. I don't wanna steal any screen
00:13:47.815 --> 00:13:50.932 share or anything. But you might have. Do you have invoices in
00:13:49.115 --> 00:13:49.675 How you?
00:13:50.932 --> 00:13:52.465 the database you're looking at?
00:13:53.425 --> 00:13:54.845 I'm sorry, do you?
00:14:00.425 --> 00:14:02.825 Yeah, like invoices is another fun one.
00:14:03.975 --> 00:14:06.895 Yeah, I think I think that relationships, at least a pretty
00:14:06.895 --> 00:14:09.669 obvious one, if this is like totally going over anyone's
00:14:09.669 --> 00:14:12.685 head, the relationship between a sales invoice and a payment.
00:14:13.435 --> 00:14:16.778 So for that one you you know you'll have an invoice and
00:14:16.778 --> 00:14:20.239 technically you can make multiple payments on an invoice,
00:14:20.239 --> 00:14:24.118 right? Like someone isn't always gonna pay the full amount. They
00:14:24.118 --> 00:14:27.580 might make a partial payment. And the way those have come
00:14:27.580 --> 00:14:31.220 together is the sales invoice payment table. So that's under
00:14:31.220 --> 00:14:34.741 payments. So in the sales invoice payments table, you just
00:14:34.741 --> 00:14:37.665 have a master identifier and a slave identifier.
00:14:38.275 --> 00:14:42.389 Uh, and on my screen at least I have a pretty good like example
00:14:42.389 --> 00:14:46.439 of someone like making a full payment on one, so you have like
00:14:46.439 --> 00:14:49.395 both have a master and slave idea of five so.
00:14:50.635 --> 00:14:53.766 Invoice ID 5 for example might have like a total of, let's say
00:14:53.766 --> 00:14:56.946 11 bucks and a balance due is 0. And then if you go over to the
00:14:56.946 --> 00:15:00.126 payments table you'll notice the payment amount was like the 11
00:15:00.126 --> 00:15:03.256 bucks, which is why the balance due is 0 on the other ones. So
00:15:03.256 --> 00:15:06.485 sometimes it's good to just get like a really simple example of.
00:15:07.495 --> 00:15:07.715 Yes.
00:15:07.625 --> 00:15:11.007 The relationship between things to like fully understand it, but
00:15:11.007 --> 00:15:13.920 some of these are pretty straightforward like this one,
00:15:13.920 --> 00:15:16.885 where it's literally just like, hey, how do I know that?
00:15:17.955 --> 00:15:20.921 In an invoice has payments on it? Well, you get the sales
00:15:20.921 --> 00:15:23.939 invoice, payments and all the sales invoice payments table
00:15:23.939 --> 00:15:26.905 really holds is hey, here's the here's the invoice that a
00:15:26.905 --> 00:15:30.024 payment was made made for. And here's the payment for it. So
00:15:30.024 --> 00:15:32.785 that's like a really simple relationship table there.
00:15:34.645 --> 00:15:37.852 So I guess just to break that down, it's like you have an
00:15:37.852 --> 00:15:41.114 invoice you can make multiple payments which would show up
00:15:38.335 --> 00:15:38.645 Umm.
00:15:40.725 --> 00:15:41.215 Yep.
00:15:41.114 --> 00:15:44.265 here, the actual payments and then the sales dot invoice
00:15:44.265 --> 00:15:47.195 payment table would map the payments to the invoice.
00:15:46.735 --> 00:15:50.235 Yeah. So you see how that first record says five and five?
00:15:50.945 --> 00:15:51.225 Yeah.
00:15:51.665 --> 00:15:56.578 So that means ID 5 and both would be the the the payment and
00:15:56.578 --> 00:15:57.785 the invoice so.
00:15:58.555 --> 00:16:01.470 That guy has a what, a balance due of he might have scroll to
00:16:01.470 --> 00:16:04.431 the right to see that, but this is how we could. Yeah, I think
00:16:04.431 --> 00:16:07.110 this is the same example of mine. So see how the amounts
00:16:07.110 --> 00:16:07.345 1130.
00:16:08.125 --> 00:16:09.955 Like 1139, actually on the left.
00:16:10.785 --> 00:16:13.325 I'm pretty sure that has a balance due of 0, but we can
00:16:10.995 --> 00:16:11.395 Yep.
00:16:13.325 --> 00:16:14.095 check real quick.
00:16:14.985 --> 00:16:16.905 That's in this table, right?
00:16:15.425 --> 00:16:15.775 So.
00:16:19.475 --> 00:16:22.105 Should be. Oh, wait, you're looking at payment.
00:16:22.305 --> 00:16:24.825 Now, now the balance due is beyond the invoice.
00:16:22.885 --> 00:16:27.355 OK. So the amount on the payments 1139 and then this guy.
00:16:28.365 --> 00:16:30.025 Total is 1130.
00:16:28.875 --> 00:16:32.730 Yeah, see. So the total was 1139 and they'll notice the balance
00:16:32.730 --> 00:16:36.644 due 0. So someone made a payment for the full amount 1139, which
00:16:36.644 --> 00:16:40.257 is why the balance due in this guy should be zero. Yeah. So
00:16:39.105 --> 00:16:39.655 Right.
00:16:40.257 --> 00:16:44.232 there you go. So so you can like straight up like just see, like,
00:16:40.635 --> 00:16:41.465 Yep, and.
00:16:44.232 --> 00:16:47.845 OK, there it is. Like that's how that makes sense. So yeah.
00:16:50.885 --> 00:16:54.451 Now, of course, if you're on a QA database, there might be some
00:16:51.175 --> 00:16:51.505 And.
00:16:54.451 --> 00:16:58.016 data inconsistency where someone like manually made the balance
00:16:58.016 --> 00:17:01.525 do higher so they could keep on paying invoices, but you know.
00:16:58.565 --> 00:16:59.325 Yeah.
00:17:02.995 --> 00:17:04.175 And and maybe.
00:17:03.035 --> 00:17:04.625 At least that's a clean example.
00:17:03.725 --> 00:17:03.985 I.
00:17:04.855 --> 00:17:05.975 Definitely happens.
00:17:05.295 --> 00:17:05.655 Yeah.
00:17:06.665 --> 00:17:09.976 And Alex, maybe to answer a question that might pop in your
00:17:09.976 --> 00:17:13.452 head is like, why even have the payments and separate table at
00:17:13.452 --> 00:17:16.983 all from the invoices right or vice versa? And the answer would
00:17:16.983 --> 00:17:20.348 be exactly like what Tristan just pointed out. Well, what if
00:17:20.348 --> 00:17:22.665 they don't pay the whole invoice at once?
00:17:23.335 --> 00:17:26.078 You don't have to make a new invoice, that's a copy every
00:17:26.078 --> 00:17:27.165 time there's a payment.
00:17:28.145 --> 00:17:31.309 Right, because that would be just like it. Gross, right? You
00:17:31.309 --> 00:17:34.006 have a ton of data in the invoices. It'd be hard to
00:17:34.006 --> 00:17:37.274 manage, hard to sort, hard to maintain. But if you put the two
00:17:37.274 --> 00:17:40.334 payments in their own table, then it makes all of the data
00:17:40.334 --> 00:17:42.875 more granular and it's like easier to work with.
00:17:45.235 --> 00:17:47.885 And I guess just to elaborate on that like.
00:17:48.935 --> 00:17:52.832 Say if we were to simplify this down and take off this table,
00:17:52.832 --> 00:17:56.665 right? So you're just gonna link the payment directly to the
00:17:56.665 --> 00:18:00.624 invoice? You're probably like. Well, why can't you just have a
00:18:00.624 --> 00:18:04.645 payment of $5 in an invoice ID of, you know, invoice 5 and then
00:18:04.645 --> 00:18:08.479 just create another record? You know, a payment of the $6.30
00:18:08.479 --> 00:18:09.735 remaining invoice 5.
00:18:10.485 --> 00:18:13.731 And the reason is because payments can be used on
00:18:13.731 --> 00:18:14.315 multiple.
00:18:16.235 --> 00:18:19.403 On multiple objects, so it's not just invoices, so there's like
00:18:19.403 --> 00:18:21.135 subscriptions and probably orders.
00:18:21.835 --> 00:18:25.439 And so you can link the payment model will work across all of
00:18:25.439 --> 00:18:29.042 those, and then you can just link them to the respective item
00:18:29.042 --> 00:18:31.715 that is getting paid in the different tables.
00:18:33.445 --> 00:18:37.584 And and not only that, but in pay hub, one payment can be a
00:18:37.584 --> 00:18:38.135 payment.
00:18:38.885 --> 00:18:39.855 For multiple.
00:18:41.295 --> 00:18:45.859 Invoices and it breaks it down and that that gets confusing.
00:18:45.859 --> 00:18:49.974 But yeah, there's a you know, our database isn't fully
00:18:49.974 --> 00:18:51.545 normalized, but like.
00:18:52.395 --> 00:18:55.688 So it might. There might be a little places where it's a
00:18:55.688 --> 00:18:59.039 little bit confusing, but generally speaking if something
00:18:59.039 --> 00:19:02.331 is like if the relationship you're looking at in SSMS is
00:19:02.331 --> 00:19:05.798 really throwing you off, one thing you can do is expand the
00:19:05.798 --> 00:19:09.321 column names, look at foreign keys. You can actually inspect
00:19:09.321 --> 00:19:12.961 and see what the constraints are on them. Or you can always go
00:19:12.961 --> 00:19:16.658 into CEF on the actual back and look at the data model and when
00:19:16.658 --> 00:19:20.297 you hover over XYZ record dot slave or whatever, which is what
00:19:20.297 --> 00:19:23.705 it's currently called, it will actually show you the type.
00:19:24.005 --> 00:19:28.273 Right. So if we were to look at the sales invoice payment,
00:19:28.273 --> 00:19:32.757 entity, data model entity and the data in SEF rather you when
00:19:32.757 --> 00:19:36.808 you hover over slave it would show that it's payment or
00:19:36.808 --> 00:19:41.075 whatever, right? And it would show that master is invoice.
00:19:42.415 --> 00:19:42.755 Umm.
00:19:44.015 --> 00:19:44.405 Sarah.
00:19:47.135 --> 00:19:49.926 And like just on like the front end. Like if you are ever going
00:19:49.926 --> 00:19:50.885 through this and like.
00:19:51.635 --> 00:19:54.887 Just because I'm sure it will occur, my approach is I
00:19:54.887 --> 00:19:58.621 literally will just follow these and open up all the tabs and
00:19:58.621 --> 00:20:02.174 then kind of tab them out in order. So like sales, invoice
00:20:02.174 --> 00:20:05.606 payment is linked to, you know, well, you get your sales
00:20:05.606 --> 00:20:09.280 invoice, you get your sales invoice payment and then you get
00:20:09.280 --> 00:20:12.953 your payment. And so just kind of keep them in order. And if
00:20:12.953 --> 00:20:16.385 you need to, you can just kind of write it out and like.
00:20:17.275 --> 00:20:18.785 You know a notepad or something.
00:20:19.615 --> 00:20:20.905 Uh, just to kind of help you.
00:20:22.145 --> 00:20:25.023 Architect everything else and it usually it'll make much more
00:20:25.023 --> 00:20:28.085 sense and you can kind of figure out what you're trying to do so.
00:20:36.425 --> 00:20:37.015 Cool.
00:20:38.055 --> 00:20:41.871 Umm, I guess. Anybody have any other questions or any other
00:20:41.871 --> 00:20:44.605 thoughts on relationships in the database?
00:20:45.285 --> 00:20:48.944 Yeah, just I was thinking I would give Alex and Brad and
00:20:48.944 --> 00:20:53.180 maybe anyone else who's new just under example because I know I I
00:20:53.180 --> 00:20:57.160 feel like accounts and users and contacts are one of the most
00:20:57.160 --> 00:21:01.075 complicated areas. So a real life example where I've been on
00:21:01.075 --> 00:21:03.835 a project where we needed this was an RX1.
00:21:05.215 --> 00:21:09.346 Arts One is a medical site where users could like, ask for a
00:21:09.346 --> 00:21:13.408 prescription, right, ask for a certain medication, and then
00:21:13.408 --> 00:21:15.845 they could have consultations with.
00:21:16.825 --> 00:21:20.727 Either a pharmacist or a doctor in the site, and then once you
00:21:20.727 --> 00:21:24.257 know once the request is approved we you know they would
00:21:24.257 --> 00:21:27.786 ship the medication to the patient. And so there was all
00:21:27.786 --> 00:21:31.750 these different relationships, all these different users on the
00:21:31.750 --> 00:21:35.155 site. So an example of, OK, why do we need an account?
00:21:36.675 --> 00:21:40.122 Why not just really users to each other, right? Like directly
00:21:40.122 --> 00:21:42.845 or something? Well, an example of that would be.
00:21:44.155 --> 00:21:46.555 Or how it's used anyway would be that.
00:21:47.265 --> 00:21:50.315 In Arcs 1A, doctor had their own account.
00:21:51.455 --> 00:21:53.105 But they would put but we.
00:21:54.275 --> 00:21:59.825 Associate their patients to that account and their patients are
00:21:59.825 --> 00:22:00.345 users.
00:22:01.415 --> 00:22:04.955 Right. So that's a way to specify, hey, who are the
00:22:04.955 --> 00:22:09.175 patients for this doctor? Who are the people that this doctor
00:22:09.175 --> 00:22:13.531 is allowed to like, review their information, right. Because we
00:22:13.531 --> 00:22:15.505 had to deal with HIPAA stuff.
00:22:16.255 --> 00:22:19.424 And so that's a real life example of like, OK, why would I
00:22:19.424 --> 00:22:22.754 ever need to associate 2 users to an account? Well, if one of
00:22:22.754 --> 00:22:26.084 them is a doctor and the other one is a patient, and you only
00:22:26.084 --> 00:22:29.414 want that patient to be able to see that doctor, and you only
00:22:29.414 --> 00:22:32.045 want that doctor to be able to see that patient.
00:22:32.765 --> 00:22:34.495 That's one way you could do it.
00:22:35.375 --> 00:22:35.595 To.
00:22:40.805 --> 00:22:44.535 Thank you, David. And yeah, I mean even with like JVM there's
00:22:44.535 --> 00:22:48.204 a lot of business cases where like we're syncing in data and
00:22:48.204 --> 00:22:51.873 they've already got existing data and they have accounts and
00:22:51.873 --> 00:22:55.662 and customers or you know maybe a suppliers that are all under
00:22:55.662 --> 00:22:59.391 these different accounts. So they definitely does get used in
00:22:59.391 --> 00:23:03.300 that manner. It's just sometimes when you're testing you're like
00:23:03.300 --> 00:23:06.969 why when would this ever occur. But like real world business
00:23:06.969 --> 00:23:09.435 scenarios and it's pretty pretty common.
00:23:13.035 --> 00:23:13.385 Cool.
00:23:13.885 --> 00:23:14.055 Yeah.
00:23:15.575 --> 00:23:18.945 But we don't have anything else I can jump over to Angular.
00:23:21.555 --> 00:23:25.698 Yeah, I have one more question, not entirely related to this,
00:23:25.698 --> 00:23:29.105 but back before when you were in the admin portal.
00:23:30.245 --> 00:23:33.628 And I literally just went to check and make sure because I
00:23:33.628 --> 00:23:37.412 didn't actually know myself. But there is no register new user on
00:23:37.412 --> 00:23:40.794 the admin portal for obvious reasons, but are the accounts
00:23:40.794 --> 00:23:43.890 created there the same or different than the accounts
00:23:43.890 --> 00:23:47.502 created in the store front? And then how do those admin portal
00:23:47.502 --> 00:23:48.705 accounts get created?
00:23:51.825 --> 00:23:55.101 If you were to create an account like in this this editor right
00:23:55.101 --> 00:23:58.325 here, this would show up in the same table. So these these are
00:23:58.325 --> 00:23:58.785 the same.
00:24:00.145 --> 00:24:03.404 But naturally this would just create the account, it wouldn't
00:24:03.404 --> 00:24:06.242 create any users or or associated contacts. You would
00:24:06.242 --> 00:24:09.395 need to go in and and create a user and associate it to the
00:24:09.395 --> 00:24:09.815 account.
00:24:11.315 --> 00:24:13.605 Did that answer your question or was it a different question?
00:24:14.575 --> 00:24:15.085 Umm.
00:24:15.865 --> 00:24:18.609 Do you know that pretty much answers it? Basically, if you
00:24:18.609 --> 00:24:21.493 created a new user in the admin portal, you cannot take those
00:24:21.493 --> 00:24:23.957 credentials into the storefront and log in with them
00:24:23.957 --> 00:24:24.515 immediately.
00:24:25.825 --> 00:24:27.505 You could hypothetically.
00:24:27.075 --> 00:24:27.485 You can.
00:24:28.265 --> 00:24:29.065 You can, yeah.
00:24:29.785 --> 00:24:30.125 Yep.
00:24:32.455 --> 00:24:35.459 And as as time has gone on with the admin portal, we've done
00:24:35.459 --> 00:24:38.414 this in a couple, but you can kind of see it Justin, if you
00:24:38.414 --> 00:24:40.235 can click the add user button there.
00:24:40.275 --> 00:24:40.535 Yep.
00:24:41.595 --> 00:24:45.921 Like if you look at all this information, this is a UI that's
00:24:45.921 --> 00:24:47.525 somewhat user friendly.
00:24:47.965 --> 00:24:51.814 Umm. But so like once you complete this, if you look at
00:24:51.814 --> 00:24:55.730 all this information and reconcile it with the tables in
00:24:55.730 --> 00:25:00.059 the back end, you'll kind of be able to see this. But this one
00:25:00.059 --> 00:25:04.114 screen, once you hit save is going to create an account, a
00:25:04.114 --> 00:25:07.755 user, a contact, and an address all in the back end.
00:25:09.005 --> 00:25:12.866 OK, I thought you said it was creating an account but not
00:25:12.866 --> 00:25:14.995 creating a user or a uh contact.
00:25:16.115 --> 00:25:19.355 Yeah, and this case? It'll do. It'll take care of all of that.
00:25:20.695 --> 00:25:24.257 And and so that's just the way that you transfer the data like
00:25:24.257 --> 00:25:24.765 from the.
00:25:25.815 --> 00:25:27.375 You know from the front end to the back end.
00:25:28.985 --> 00:25:32.566 Yeah, I I may have misspoke, Nick, but you can just create an
00:25:29.105 --> 00:25:29.825 OK, cool.
00:25:32.566 --> 00:25:36.205 account. But yeah, if you create the user here like as Brandon
00:25:36.205 --> 00:25:38.515 said, it will create that data for you.
00:25:39.675 --> 00:25:42.971 Umm. And you can set the password here too, so that's how
00:25:42.971 --> 00:25:45.925 you would essentially get the login credentials so.
00:25:46.885 --> 00:25:47.285 OK.
00:25:49.855 --> 00:25:50.155 Go.
00:25:51.555 --> 00:25:52.345 Uh, Michael?
00:25:55.335 --> 00:25:58.945 Yeah. While we're on the topic of the database, could we see
00:25:58.945 --> 00:26:01.725 the system dot system log just real quick too?
00:26:02.465 --> 00:26:02.665 Sure.
00:26:02.545 --> 00:26:05.135 I feel like that will come up in some point.
00:26:05.665 --> 00:26:07.565 Yeah, that is a good point.
00:26:08.165 --> 00:26:08.895 Uh.
00:26:12.535 --> 00:26:15.615 Where am I system that system log?
00:26:17.875 --> 00:26:19.535 Probably should the top 1000.
00:26:23.865 --> 00:26:28.267 Yeah. So, uh, which? Yeah, this is a pretty good thing to touch
00:26:28.267 --> 00:26:32.599 on, not really related to the relationships we're just talking
00:26:32.599 --> 00:26:33.355 about, but.
00:26:34.415 --> 00:26:36.165 This is good to know so.
00:26:36.855 --> 00:26:37.825 You'll notice.
00:26:39.275 --> 00:26:43.655 Either in the back end or in a network call.
00:26:45.195 --> 00:26:49.544 Some of the errors are gonna come with essentially a a set
00:26:49.544 --> 00:26:49.765 ID.
00:26:50.485 --> 00:26:54.494 Umm and I I I'm blanking on the right name. It's not a actual
00:26:54.494 --> 00:26:55.075 response.
00:26:56.295 --> 00:26:59.828 Anyone has it, but it's essentially a a string that
00:26:59.828 --> 00:27:03.903 would link to what the error is in the system log. Jesse is
00:27:03.903 --> 00:27:05.805 there correct name for that.
00:27:06.505 --> 00:27:08.335 You just mean the GUID, yeah.
00:27:06.675 --> 00:27:07.335 The GUID.
00:27:09.005 --> 00:27:10.335 Yeah. Good. OK.
00:27:09.065 --> 00:27:10.775 Good. Yeah. Like what he said.
00:27:11.655 --> 00:27:11.835 But.
00:27:14.625 --> 00:27:17.763 I don't know how to readily pull one up, or if anybody has an
00:27:17.763 --> 00:27:20.851 example or an image of 1, but you know essentially you would
00:27:20.495 --> 00:27:22.815 Ouch, you better. I got one working on it right now.
00:27:20.851 --> 00:27:21.255 kind of.
00:27:23.285 --> 00:27:24.075 Alright, cool.
00:27:23.475 --> 00:27:27.124 From the yeah, this would be from, but it's in my database,
00:27:25.455 --> 00:27:25.825 OK.
00:27:27.124 --> 00:27:29.495 but it'll look just like this kind of.
00:27:31.015 --> 00:27:32.095 This is from uh.
00:27:33.885 --> 00:27:37.095 Mr Brendan Lyon gets anti kudos from me, by the way.
00:27:38.405 --> 00:27:39.195 This is from that.
00:27:39.535 --> 00:27:40.905 Uh, yeah.
00:27:42.075 --> 00:27:42.405 Alright.
00:27:42.765 --> 00:27:43.245 Perfect.
00:27:45.765 --> 00:27:49.138 So yeah that that log ID on there. You know if if you see
00:27:49.138 --> 00:27:52.802 that it what it's doing is it's gonna allow you to go into the
00:27:52.802 --> 00:27:56.582 database and ultimately grab the log that's associated with that
00:27:56.582 --> 00:28:00.362 error. So like I have no failing calls here, but normally you're
00:28:00.362 --> 00:28:03.852 going to kind of click on a network call, go to preview and
00:28:03.852 --> 00:28:05.305 that you're going to get.
00:28:05.595 --> 00:28:08.135 Yeah, the GUID right here.
00:28:10.075 --> 00:28:13.098 So as you can see, there's not too much. Well, there is a
00:28:13.098 --> 00:28:16.172 message could not be serialized, so I guess that's kind of
00:28:16.172 --> 00:28:17.735 descriptive, but sometimes it.
00:28:17.255 --> 00:28:18.755 Yeah, sorry.
00:28:21.285 --> 00:28:21.765 Umm.
00:28:21.515 --> 00:28:22.385 Sorry about that.
00:28:22.895 --> 00:28:26.093 No, no, you're good. Sometimes there's a message. I think
00:28:26.093 --> 00:28:29.620 there's oftentimes there there may not be anything. I just kind
00:28:29.620 --> 00:28:33.259 of the the GUID. So you can come in here and ultimately just kind
00:28:33.259 --> 00:28:36.676 of query for that GUID. It's gonna be related to custom keys.
00:28:36.676 --> 00:28:38.605 You could do something like where.
00:28:43.595 --> 00:28:47.165 That was way too big to post. Sorry about that. I copy pasted
00:28:43.695 --> 00:28:44.335 Where?
00:28:47.165 --> 00:28:50.735 you the full thing. It is quite bigger than I thought it was.
00:28:52.735 --> 00:28:56.694 We're custom key. This is at least how I do it like
00:28:56.694 --> 00:28:58.825 parentheses put in the GUID.
00:29:00.275 --> 00:29:03.472 And then ultimately it, it'll it'll kind of pull up this
00:29:03.472 --> 00:29:07.061 record. Obviously, I don't have it readily available right now,
00:29:07.061 --> 00:29:07.285 but.
00:29:08.565 --> 00:29:10.745 Quick this type of query will get you there.
00:29:11.435 --> 00:29:13.365 And yeah you can.
00:29:15.105 --> 00:29:17.772 Kind of pull out this description here and at least
00:29:17.772 --> 00:29:20.695 what I do is I just kind of put it into Jason Formatter.
00:29:21.525 --> 00:29:23.085 And you should be able to read the stack trace.
00:29:23.915 --> 00:29:25.745 Umm. Which would be right here?
00:29:27.295 --> 00:29:31.952 So these can get pretty long and anyone correct me if I'm wrong,
00:29:31.952 --> 00:29:32.955 but I believe.
00:29:34.235 --> 00:29:38.476 The file path that's closest to the left hand side is like the
00:29:38.476 --> 00:29:42.852 top of the stack, so it's gonna be most closely related to where
00:29:42.852 --> 00:29:47.025 your error is, and as you slowly move to the right, it's more
00:29:44.025 --> 00:29:44.515 Correct.
00:29:47.025 --> 00:29:47.765 high level.
00:29:50.155 --> 00:29:50.455 Could be.
00:29:50.225 --> 00:29:51.395 Yes, that's that's correct.
00:29:52.055 --> 00:29:55.841 Yeah. So I always kind of start these. Yeah, just kind of start
00:29:55.841 --> 00:29:59.685 scrolling to the right and then you'll start seeing a file path.
00:30:01.245 --> 00:30:04.553 And so if we look, we got 04 providers service stack
00:30:04.553 --> 00:30:08.360 authentication shared line 562 and so you can go in the back
00:30:08.360 --> 00:30:12.417 end you know jump to this line, this file it ultimately put your
00:30:12.417 --> 00:30:16.161 break point on and attach and see what's going on, fix some
00:30:16.161 --> 00:30:16.535 stuff.
00:30:21.445 --> 00:30:25.474 Yeah. And that that uh, that GUID will be requested if if
00:30:25.474 --> 00:30:30.059 you're ever reaching out to, you know, somebody for help. Brendan
00:30:30.059 --> 00:30:30.475 James.
00:30:30.565 --> 00:30:34.815 Uh, though often ask you to, you know, basically what the error
00:30:34.815 --> 00:30:38.665 is that you're getting, so understanding how to go in and
00:30:38.665 --> 00:30:42.981 look is critical, which actually brings up another good point. I
00:30:42.981 --> 00:30:47.296 think at times there can be this tendency to think that like SQL
00:30:47.296 --> 00:30:47.495 is.
00:30:48.875 --> 00:30:52.098 You know, like a back end thing, and it is absolutely not. And
00:30:52.098 --> 00:30:55.065 not only that, but it's one of the easiest things to just
00:30:55.065 --> 00:30:57.929 Google. So even if you're a front end developer and you
00:30:57.929 --> 00:30:59.975 don't have a lot of experience with it.
00:31:00.865 --> 00:31:03.745 I mean it, it is one of the easiest things to just Google.
00:31:03.745 --> 00:31:06.430 You know what you need to do and you'll get the answer
00:31:06.430 --> 00:31:07.015 immediately.
00:31:07.635 --> 00:31:10.755 Umm. And I mean, I guess the way you can think of it is.
00:31:11.565 --> 00:31:15.541 As assuming that our website you know is functional like all the
00:31:15.541 --> 00:31:19.028 data is actually, you know coming from the front end, so
00:31:19.028 --> 00:31:22.698 front end developer needs to know how to be able to go into
00:31:22.698 --> 00:31:25.695 the database and and manipulate it a little bit.
00:31:25.685 --> 00:31:25.965 Umm.
00:31:27.965 --> 00:31:31.536 Yeah, I would agree with that. I don't think I've yet to come
00:31:31.536 --> 00:31:35.050 across the need to write any sequel that I haven't been able
00:31:35.050 --> 00:31:38.333 to Google, and I've never actually taken a SQL course or
00:31:38.333 --> 00:31:41.615 or anything of the sort, so should be readily available.
00:31:42.645 --> 00:31:45.867 They're really, in my experience only doing joins is where life
00:31:45.867 --> 00:31:48.586 gets a little complicated, and obviously there's more
00:31:48.586 --> 00:31:51.556 complicated stuff. I'm sure people in here know how to do,
00:31:51.556 --> 00:31:54.828 but the hardest thing I've tried to do is to join, but you don't
00:31:54.828 --> 00:31:58.050 really ever need to do a join if you're willing to just look at
00:31:58.050 --> 00:31:58.855 multiple tables.
00:31:59.625 --> 00:32:00.035 So.
00:32:00.605 --> 00:32:00.995 Right.
00:32:02.235 --> 00:32:05.219 So you can get away as a front end or you can get away with
00:32:05.219 --> 00:32:07.555 just crud operations and really only you know.
00:32:09.395 --> 00:32:11.015 Create and update really.
00:32:11.795 --> 00:32:13.455 Or read and update rather.
00:32:14.665 --> 00:32:15.455 I would say.
00:32:22.505 --> 00:32:26.255 Go. Alright, I'll. I'll jump to angular.
00:32:29.755 --> 00:32:32.665 We pull up, we'll go with JB.
00:32:34.685 --> 00:32:40.109 So obviously I'm sure everyone's familiar. We've rebuilt the
00:32:40.109 --> 00:32:42.065 front end in react so.
00:32:43.375 --> 00:32:49.374 Angular J's what we're on prior and I believe it was angular.
00:32:49.374 --> 00:32:51.695 We're on Angular 1.6 so.
00:32:52.235 --> 00:32:56.235 Uh, correct me if I'm wrong, but Angular JS is different from the
00:32:56.235 --> 00:32:59.750 modern versions of Angular, which changed to just angular
00:32:59.750 --> 00:33:03.386 from version two and higher. So I think Angular is maybe on
00:33:03.386 --> 00:33:05.325 version 9 Now, maybe version 10.
00:33:06.085 --> 00:33:09.165 Umm so Angular JS is different.
00:33:11.425 --> 00:33:15.214 I think the the main the main concepts are the same, it's just
00:33:15.214 --> 00:33:19.063 kind of some syntax and I'm sure newer versions of Angular just
00:33:19.063 --> 00:33:19.905 have you know.
00:33:20.735 --> 00:33:21.775 You know better.
00:33:21.845 --> 00:33:22.285 Yeah.
00:33:23.945 --> 00:33:26.325 And the better word, but maybe tooling.
00:33:27.175 --> 00:33:28.145 And functions.
00:33:29.795 --> 00:33:33.846 But I'll kind of walk through how we use angular on the front
00:33:33.846 --> 00:33:37.701 end, but it's still being used in the admin. So on any new
00:33:37.701 --> 00:33:41.686 projects the admins probably where you're gonna run into it,
00:33:41.686 --> 00:33:45.802 but if you are on any older CEF projects, those would be using
00:33:45.802 --> 00:33:50.114 angular in the storefront. Also, the good thing about the angular
00:33:50.114 --> 00:33:54.099 is I mean it's been around for a while. So it's kind of been
00:33:54.099 --> 00:33:58.345 battle tested and all the things are kind of in place to do what
00:33:58.345 --> 00:33:59.325 you need to do.
00:33:59.805 --> 00:34:02.532 So once you understand it, you can kind of. Like I said,
00:34:02.532 --> 00:34:05.592 everything's kind of built and there's always something to look
00:34:05.592 --> 00:34:06.405 at for reference.
00:34:07.765 --> 00:34:10.582 React as the same way, but at you know Angular. Obviously
00:34:10.582 --> 00:34:12.475 we've had it for longer at this point.
00:34:14.475 --> 00:34:16.525 So I'll just kind of start by walking through.
00:34:18.195 --> 00:34:22.185 I guess how Angular gets into DNN.
00:34:24.335 --> 00:34:26.195 For those that aren't familiar, so.
00:34:27.035 --> 00:34:30.981 You know, we're still using DNN with react, kind of a similar
00:34:30.981 --> 00:34:34.799 method of how we're objecting components or directives into
00:34:34.799 --> 00:34:38.553 the DNN pages, but I'll just kind of jump through JVM real
00:34:38.553 --> 00:34:39.125 quick so.
00:34:40.465 --> 00:34:41.055 Ah.
00:34:41.975 --> 00:34:45.875 I I know in the daily standups that I've been doing in the
00:34:45.875 --> 00:34:49.974 morning, we've run into this a couple times where, like maybe
00:34:49.974 --> 00:34:54.072 you're updating the skin source folder and the DBO tabs table
00:34:54.072 --> 00:34:58.368 for DNN and then like the home, the home record doesn't have the
00:34:58.368 --> 00:35:02.467 skin source. So I think Brad and probably Nick and Jeremy and
00:35:02.467 --> 00:35:05.838 possibly Kevin have all encountered that. But what
00:35:05.838 --> 00:35:10.002 that's doing is it's actually saying, look at the DNN skin and
00:35:10.002 --> 00:35:13.505 then I want to find the page that's associated with.
00:35:13.575 --> 00:35:17.222 Yeah, this tab like you know what? What? What page? You're
00:35:17.222 --> 00:35:20.868 on. So if you're looking at home and you don't have a home
00:35:20.868 --> 00:35:24.700 record, it's it's not gonna be looking at this. If you update
00:35:24.700 --> 00:35:28.470 that, it will be looking at this this home page. And when it
00:35:28.470 --> 00:35:32.240 does, you can kind of see we have these CEF directives right
00:35:32.240 --> 00:35:36.257 here. So CEF featured products, SEF, popular products. In react,
00:35:36.257 --> 00:35:38.605 they're called data react components.
00:35:40.675 --> 00:35:43.984 But in here this is how you kind of get that the angular into the
00:35:43.984 --> 00:35:44.485 DNN pages.
00:35:46.375 --> 00:35:50.061 I believe these are the only two on this page and so I can kind
00:35:50.061 --> 00:35:53.689 of jump into these directives. But before I do, I'll just kind
00:35:53.689 --> 00:35:57.318 of walk through the the folder structure, but I guess before I
00:35:57.318 --> 00:36:01.003 move on, does anybody have any questions on like how Angular or
00:36:01.003 --> 00:36:04.689 react for that matter, how we're kind of putting those into the
00:36:04.689 --> 00:36:07.972 DNN pages? Is there any clarification that I can give on
00:36:07.972 --> 00:36:08.605 that piece?
00:36:13.325 --> 00:36:13.845 Umm.
00:36:14.575 --> 00:36:18.087 Was that directives at the top of this page that tell it to
00:36:18.087 --> 00:36:19.315 load some components?
00:36:21.665 --> 00:36:22.555 Umm.
00:36:22.625 --> 00:36:24.235 I didn't see anything.
00:36:25.655 --> 00:36:26.745 The these.
00:36:26.035 --> 00:36:26.465 There's.
00:36:27.655 --> 00:36:28.355 What was it, Jesse?
00:36:28.675 --> 00:36:33.525 Line 22 is is an angular directive 33.
00:36:32.625 --> 00:36:32.835 Yeah.
00:36:33.865 --> 00:36:37.841 Umm. And we're on the footer. You'd have. You'd have to go to
00:36:37.841 --> 00:36:41.945 the footer. You know, DNN lets you kind of just plug the footer
00:36:41.945 --> 00:36:46.113 in every page, so you'd have to go to that and you'd see. Pardon
00:36:46.113 --> 00:36:46.305 me.
00:36:46.985 --> 00:36:50.498 You'd see all of the actual Angular JS files being
00:36:50.498 --> 00:36:54.561 downloaded. Couple of other Angular JS UI SF plus that's a
00:36:54.561 --> 00:36:58.556 directive there. Yeah. And then you and here's, you know,
00:36:55.265 --> 00:36:56.275 Oh, I see.
00:36:56.925 --> 00:36:57.355 OK.
00:36:58.556 --> 00:36:59.795 download them all.
00:37:01.645 --> 00:37:06.603 345 There the TypeScript and the templates and then the config
00:37:06.603 --> 00:37:11.402 right after that, and then the initialization thing was just
00:37:11.402 --> 00:37:13.605 runs angular bootstrap over.
00:37:14.715 --> 00:37:15.665 Over it all.
00:37:16.575 --> 00:37:19.216 After DNN loads. So that's why you could plug in all this stuff
00:37:19.216 --> 00:37:19.835 right into DNN.
00:37:20.475 --> 00:37:20.835 Pretty cool.
00:37:24.865 --> 00:37:28.359 OK, cool. Yeah, now I get it. It's all blurred up in the
00:37:28.359 --> 00:37:30.075 script section litter. Cool.
00:37:30.485 --> 00:37:30.745 Yeah.
00:37:35.605 --> 00:37:38.757 And so yeah, I'll just kind of walk through this. So you know,
00:37:38.757 --> 00:37:41.859 when you're working in here, it's gonna be angular, you know,
00:37:41.859 --> 00:37:44.561 all places where you're gonna likely be making edits,
00:37:44.561 --> 00:37:47.612 TypeScript and HTML going to be in the framework folder. And
00:37:47.612 --> 00:37:50.614 then in the storefront, it's called store. But if you're in
00:37:50.614 --> 00:37:52.715 the admin, it's going to be called admin.
00:37:54.715 --> 00:37:57.946 And so when you come in here, you get kind of these under
00:37:57.946 --> 00:38:01.288 score folders, which I guess I kind of like the think of as
00:38:01.288 --> 00:38:04.798 just things that are gonna be used throughout the platform. So
00:38:04.798 --> 00:38:08.195 in API you kind of you have all of your different endpoints.
00:38:09.295 --> 00:38:10.735 So if we click into these.
00:38:11.305 --> 00:38:15.625 Uh, can you Scroll down? We have interfaces up here and then so
00:38:15.625 --> 00:38:19.270 these would be attributed endpoints. So check general
00:38:19.270 --> 00:38:21.565 attributes exist by display name.
00:38:23.345 --> 00:38:24.725 Just various different ones.
00:38:26.235 --> 00:38:30.238 You know, we have ones for brands, franchises, products,
00:38:30.238 --> 00:38:34.731 pricing. They're all very well organized, same as in React. And
00:38:34.731 --> 00:38:38.312 if you need to, this is ultimately going to be the
00:38:38.312 --> 00:38:42.525 endpoint URL as you can see, they're kind of separated out,
00:38:42.525 --> 00:38:47.018 but you have this join after. So in the browser would look like
00:38:47.018 --> 00:38:49.475 pricing prices range for variants.
00:38:50.605 --> 00:38:53.539 And if you need to see what the the parameters are that are
00:38:53.539 --> 00:38:56.228 supposed to go into this endpoint, this is what I find
00:38:56.228 --> 00:38:59.259 most helpful is you can just kind of control click into these
00:38:59.259 --> 00:39:00.285 different interfaces.
00:39:01.015 --> 00:39:04.376 And see what what actually can these endpoints should be
00:39:04.376 --> 00:39:04.965 receiving.
00:39:06.285 --> 00:39:08.853 Like this one just saying, you know, you'll pass in a product
00:39:08.853 --> 00:39:09.515 ID and quantity.
00:39:10.935 --> 00:39:14.558 Calculate prices for products. This is taken in array of
00:39:14.558 --> 00:39:17.735 numbers which are gonna be product IDs and so on.
00:39:18.535 --> 00:39:22.013 And you can access these anywhere in the storefront, and
00:39:22.013 --> 00:39:25.673 I'll kind of jump into that when we get into the directives
00:39:25.673 --> 00:39:29.090 themselves. But yeah, just so you know, pretty much all
00:39:29.090 --> 00:39:32.994 endpoints or all endpoints are found under this under score API
00:39:32.994 --> 00:39:33.665 folder, so.
00:39:36.215 --> 00:39:37.685 Going into core.
00:39:39.755 --> 00:39:42.942 I don't know the best way to describe this, but I mean I
00:39:42.942 --> 00:39:46.295 guess that this is just core functionality of the platform.
00:39:47.615 --> 00:39:51.436 Seth config is what's coming from the back end, so all of the
00:39:51.436 --> 00:39:55.257 app settings that we kind of you know set in the app settings
00:39:55.257 --> 00:39:55.565 file.
00:39:57.195 --> 00:39:59.975 Are ultimately going to be coming through as as this setcon
00:39:59.975 --> 00:40:02.662 thing. So you can kind of see the types at what should be
00:40:02.662 --> 00:40:03.125 available.
00:40:11.385 --> 00:40:15.975 Let me see this four is which I guess they probably won't get
00:40:15.975 --> 00:40:17.085 into these for.
00:40:18.835 --> 00:40:21.475 Sake of not getting too complicated.
00:40:22.765 --> 00:40:26.940 There's filter functions. These are different functions that you
00:40:26.940 --> 00:40:30.859 can run against the HTML to kind of a change the data or not
00:40:30.859 --> 00:40:34.455 change the data, but it's more I guess format the data.
00:40:34.855 --> 00:40:35.315 Uh.
00:40:36.745 --> 00:40:40.351 So like, this one's around down one. I actually made this this
00:40:40.351 --> 00:40:44.013 essentially you can just kind of tag this on the end of an HTML
00:40:44.013 --> 00:40:47.504 when you're binding to some piece of data. So say maybe it's
00:40:47.504 --> 00:40:49.335 a product price that's you know.
00:40:50.885 --> 00:40:55.525 25.12 cents, you can give it up the round down filter and this
00:40:55.525 --> 00:40:59.795 will just make it $25.00 so it'll give you a map dot for.
00:41:01.075 --> 00:41:05.591 A lot of the ones that get used in here is globalized currency,
00:41:05.591 --> 00:41:09.824 which essentially when you pass in, it will give the number
00:41:09.824 --> 00:41:13.986 that's passed into the the filter. The currency formatting
00:41:13.986 --> 00:41:18.431 of the platform. So most times it's gonna be U.S. dollars, but
00:41:18.431 --> 00:41:22.312 I believe we can also do Canadian dollars and probably
00:41:22.312 --> 00:41:24.075 other currencies as well.
00:41:25.405 --> 00:41:27.993 And there's a good bit of these in here, and you can create
00:41:27.993 --> 00:41:28.855 custom ones too, so.
00:41:31.265 --> 00:41:32.135 These are pretty cool.
00:41:33.765 --> 00:41:34.525 Ah.
00:41:33.915 --> 00:41:36.305 I have one question, Justin, for you too far ahead.
00:41:36.555 --> 00:41:36.925 Sure.
00:41:37.675 --> 00:41:40.655 Can you go back to the SEF config TS file?
00:41:41.195 --> 00:41:41.485 Yep.
00:41:42.275 --> 00:41:44.929 And you said this is all of the app settings pulled from the
00:41:44.929 --> 00:41:45.625 back end, right?
00:41:47.035 --> 00:41:51.105 Yeah. So the the app settings get mapped into a JS configs and
00:41:51.105 --> 00:41:54.335 then this is the TypeScript file for it. So yeah.
00:41:56.605 --> 00:41:59.575 OK, so if I was making app settings updates.
00:42:00.475 --> 00:42:04.094 On the back end for one of my tickets today also need to be
00:42:04.094 --> 00:42:06.325 made manually here in the front end.
00:42:09.635 --> 00:42:13.665 Umm this file? Yeah, does it?
00:42:11.075 --> 00:42:11.625 Yeah.
00:42:12.785 --> 00:42:15.375 Not, but maybe not specifically in this one, right?
00:42:17.385 --> 00:42:18.155 Sorry, Justin.
00:42:17.715 --> 00:42:23.521 In my. No. That's alright. Please. Jesse, any any any input
00:42:23.521 --> 00:42:24.585 is welcome.
00:42:25.245 --> 00:42:29.047 But yeah, if you are making them and they're specifically to be
00:42:29.047 --> 00:42:32.552 mapped to the front end, which you gotta also, I mean, you
00:42:32.552 --> 00:42:36.295 gotta do that on your C# file that gets storefront or store or
00:42:36.295 --> 00:42:39.265 like shared if there's a feature set style thing.
00:42:39.415 --> 00:42:43.452 Yeah, uh, if they're being specifically supposed to be
00:42:43.452 --> 00:42:47.928 given to the admin, you don't have to, I guess, but it would
00:42:47.928 --> 00:42:51.891 be really nice if you added it to this file if it was
00:42:51.891 --> 00:42:56.367 AngularJS. And then there's a similar one that I can't think
00:42:56.367 --> 00:42:58.715 of the name right now for react.
00:43:03.015 --> 00:43:05.685 But it's like this, it's just TypeScript for it.
00:43:06.845 --> 00:43:07.275 OK.
00:43:08.835 --> 00:43:12.072 Can there's essentially yeah Seth config for the storefront
00:43:12.072 --> 00:43:15.255 and for the admin right. And they are two different files.
00:43:18.015 --> 00:43:21.665 Yeah. And then the one for react as well for modern projects.
00:43:20.855 --> 00:43:21.115 Yep.
00:43:22.435 --> 00:43:22.665 Yep.
00:43:26.265 --> 00:43:26.575 So.
00:43:31.145 --> 00:43:32.955 So with that, I'll.
00:43:35.105 --> 00:43:36.235 The factories.
00:43:39.465 --> 00:43:43.289 Contact factory I. I'll admit I don't use these too often. If
00:43:43.289 --> 00:43:47.235 anybody has any input it wants to chime in on these, please do.
00:43:48.145 --> 00:43:48.605 Uh.
00:43:55.315 --> 00:43:59.585 The services and stuff. You mean all those? Ohh yeah, they.
00:43:57.505 --> 00:44:01.417 Sure. Yeah. I guess service is the in factories. Any info that
00:44:01.417 --> 00:44:03.155 anyone wants to lend please?
00:44:03.555 --> 00:44:07.614 Yeah, it's just a super great way of having a logic that
00:44:07.614 --> 00:44:11.673 needed to be used in many different places in, you know,
00:44:11.673 --> 00:44:16.087 just the one spot. For example, like there's a cart, one that
00:44:16.087 --> 00:44:20.502 gets used a whole lot where you know, half a dozen things can
00:44:20.502 --> 00:44:24.916 add something to the cart and then this one thing is what had
00:44:24.916 --> 00:44:29.473 all of the logic for that. You know, you just called a function
00:44:29.473 --> 00:44:31.965 from that means pretty basic just.
00:44:32.215 --> 00:44:38.008 Uh, just a service, uh, but we're kind of working towards
00:44:38.008 --> 00:44:40.005 taking that pattern.
00:44:41.695 --> 00:44:44.933 In in a React way and and utilizing it in nude stuff
00:44:44.933 --> 00:44:48.781 because it gets very unwieldy pretty quick if you don't have a
00:44:48.781 --> 00:44:52.751 centralized place to store logic like that. So that's what those
00:44:52.751 --> 00:44:56.721 were for all those services and factories as well. The factories
00:44:55.925 --> 00:44:56.175 Yeah.
00:44:56.721 --> 00:45:00.264 made an object like one made a model for you I believe or
00:45:00.264 --> 00:45:02.035 promises and stuff like that.
00:45:02.845 --> 00:45:05.405 Yeah. So, yeah, thank you, Jesse.
00:45:07.145 --> 00:45:09.255 I guess for the factories like I I've used.
00:45:10.165 --> 00:45:13.212 The modal factories I guess is probably the one I'm most
00:45:13.212 --> 00:45:16.258 familiar with. The service is I guess I I misspoke cause
00:45:16.258 --> 00:45:18.235 obviously and for miliar with these.
00:45:18.615 --> 00:45:18.965 Uh, yeah.
00:45:20.505 --> 00:45:23.852 Yeah, I I guess the way to think of these is, yeah, they're
00:45:23.852 --> 00:45:27.533 they're essentially services for different areas of the site that
00:45:27.533 --> 00:45:29.875 you can inject into different directives.
00:45:31.205 --> 00:45:35.189 Quite easily, and I think the way that I'm gonna go about this
00:45:35.189 --> 00:45:38.857 is just jump right into the directives. So let me try and
00:45:38.857 --> 00:45:41.765 find a good one. We'll go to like purchasing.
00:45:44.175 --> 00:45:45.635 He purchased TS.
00:45:47.905 --> 00:45:49.145 Yes, we can start here.
00:45:51.575 --> 00:45:55.465 And so yeah, the way angular is kind of a broken up is.
00:45:56.545 --> 00:46:00.493 In 90% of areas, you're gonna find a TypeScript file and then
00:46:00.493 --> 00:46:04.568 in associated HTML file and so the HTML is essentially gonna be
00:46:04.568 --> 00:46:08.133 the view. And you know what's actually rendering in the
00:46:08.133 --> 00:46:12.335 browser. And then the TypeScript file is gonna be the associated.
00:46:12.735 --> 00:46:17.105 You know TypeScript that that's going with that that template.
00:46:19.405 --> 00:46:22.908 And I guess I'll just kind of start with the TypeScript going
00:46:22.908 --> 00:46:26.467 top down. So you can see we have different properties that are
00:46:26.467 --> 00:46:29.630 gonna be up top. Normally there's gonna be your getters
00:46:29.630 --> 00:46:32.906 and setters and then there's gonna be your functions down
00:46:32.906 --> 00:46:36.352 below and at the bottom of the TypeScript file it's gonna be
00:46:36.352 --> 00:46:39.572 your constructor which is where you kind of inject those
00:46:39.572 --> 00:46:40.645 different services.
00:46:41.765 --> 00:46:44.967 So the cool thing about the services is and it took me a
00:46:44.967 --> 00:46:48.394 while to kind of wrap my head around this, but once I'm like
00:46:48.394 --> 00:46:51.933 ohh you can use these anywhere, that's when I kind of realized
00:46:51.933 --> 00:46:54.685 and started getting comfortable with angular so.
00:46:55.545 --> 00:46:57.935 To inject a service into.
00:46:59.425 --> 00:47:03.093 This directive all you need to do is just kind of add a line
00:47:03.093 --> 00:47:06.761 that looks like this right below it, and then you're able to
00:47:06.761 --> 00:47:09.165 access whatever is in that service. So.
00:47:10.185 --> 00:47:13.798 Yeah, here's the the message model factory. I guess some,
00:47:13.798 --> 00:47:17.410 maybe we can use like the authentication service. So if I
00:47:17.410 --> 00:47:18.095 do control.
00:47:20.555 --> 00:47:21.355 Shift death.
00:47:21.075 --> 00:47:22.935 You you have the purchase service right there.
00:47:24.545 --> 00:47:25.055 What was it?
00:47:25.455 --> 00:47:27.275 You have to see me purchase service in there.
00:47:30.675 --> 00:47:34.045 Well, I was. I was gonna add a different one. But why can you
00:47:33.145 --> 00:47:36.335 Oh, to add 100 I got you. I got you. Yeah, sorry.
00:47:34.045 --> 00:47:34.425 ask me?
00:47:37.515 --> 00:47:38.105 Umm.
00:47:46.685 --> 00:47:49.635 Yes. See, I could just search up thing to teach in service.
00:47:56.555 --> 00:47:59.812 And so yeah, I'm just trying to look for the correct syntax, but
00:47:59.812 --> 00:48:02.819 essentially if you were to add, you know the authentication
00:48:02.819 --> 00:48:05.925 service, I normally go because I know it's gonna be somewhere
00:48:05.925 --> 00:48:08.832 else, just kind of search authentication. You should find
00:48:08.832 --> 00:48:10.635 another constructor that's kind of.
00:48:11.305 --> 00:48:14.139 You know that will have it. You can see services I
00:48:14.139 --> 00:48:17.750 authentication service and so if we were to go back to this one,
00:48:17.750 --> 00:48:20.917 you can simply plug this in under here and now you would
00:48:20.917 --> 00:48:23.305 have access to whatever is in the service.
00:48:24.015 --> 00:48:24.575 Umm.
00:48:25.605 --> 00:48:29.653 Wherever in this TypeScript file. So some of these will have
00:48:29.653 --> 00:48:34.033 a load function. It doesn't look like this one does, but you know
00:48:34.033 --> 00:48:38.015 any like startup logic for this directive can go inside the
00:48:38.015 --> 00:48:42.196 constructor, which is kind of what's going on here. Looks like
00:48:42.196 --> 00:48:45.115 there's a good bit going on here, a lot of.
00:48:48.235 --> 00:48:50.675 Scope dot on so that be like a broadcast.
00:48:51.515 --> 00:48:52.185 Umm.
00:48:53.695 --> 00:48:58.216 I won't walk through all of that, but say if we were to look
00:48:58.216 --> 00:48:59.475 at start time or.
00:49:00.205 --> 00:49:04.391 And we wanted to access the authentication service in here
00:49:04.391 --> 00:49:07.725 we could simply do something like this dot CV.
00:49:12.575 --> 00:49:15.135 Stevie authentication service I believe.
00:49:19.355 --> 00:49:20.725 Right. And then if you?
00:49:22.115 --> 00:49:26.072 Look at your Intellisense. You can see that you have access to
00:49:26.072 --> 00:49:29.839 all of the different methods that are part of that service,
00:49:29.839 --> 00:49:33.795 so I'm trying to think of one that might be useful. So like is
00:49:33.795 --> 00:49:37.689 authenticated, is checking you know, instead of checking that
00:49:37.689 --> 00:49:41.771 if a user is logged in. This is kind of commonplace to make that
00:49:41.771 --> 00:49:45.475 check. So CVI authentication service dot is authenticated.
00:49:48.445 --> 00:49:51.087 And let me see if we can find a place for this is actually being
00:49:51.087 --> 00:49:51.655 used properly.
00:50:10.255 --> 00:50:13.605 And so I guess that's, yeah, that probably is just the the
00:50:13.605 --> 00:50:16.330 normal use. So the authentication check is just
00:50:16.330 --> 00:50:19.737 occurring when you kind of call that that method. So if you
00:50:19.737 --> 00:50:23.200 were, you know wanting to make sure that the users logged in
00:50:23.200 --> 00:50:26.039 something very similar to here is CVF this dot CC
00:50:26.039 --> 00:50:29.559 authentication service dot is authenticated, you can put your
00:50:29.559 --> 00:50:31.035 logic inside the if check.
00:50:33.205 --> 00:50:35.784 So you can do that with all services, which makes it pretty
00:50:35.784 --> 00:50:38.577 powerful. Like I said, once you kind of get the understanding of
00:50:38.577 --> 00:50:38.705 it.
00:50:40.205 --> 00:50:45.223 You can also access the services in the HTML itself, so if I were
00:50:45.223 --> 00:50:49.175 to come over to here and jump to purchase dot HTML.
00:50:49.795 --> 00:50:53.583 Umm, I will go through this a little bit more, but we could do
00:50:53.583 --> 00:50:54.845 like a dev class row.
00:50:55.895 --> 00:51:01.068 Uh, for angular, if you wanna conditionally render HTML, you
00:51:01.068 --> 00:51:04.205 use an NGF. You could do NGF equals.
00:51:06.475 --> 00:51:09.475 For this case it would be P control.
00:51:10.185 --> 00:51:14.065 And I'll go into this dot CV.
00:51:15.685 --> 00:51:16.945 Authentication.
00:51:20.125 --> 00:51:22.575 Service dot is.
00:51:25.055 --> 00:51:28.933 Authenticated and this would essentially give you a
00:51:28.933 --> 00:51:33.705 conditional render on this dev if the user signed in it or not.
00:51:34.755 --> 00:51:37.465 So you can access the services inside the HTML also.
00:51:38.315 --> 00:51:42.854 Ohhh, what's actually winking HTML to the TypeScript itself.
00:51:42.854 --> 00:51:47.691 Is this controller here which we can see at the bottom below the
00:51:47.691 --> 00:51:52.304 constructor. So right here it's actually adding the directive
00:51:52.304 --> 00:51:54.015 which is self purchase.
00:51:56.255 --> 00:51:59.757 And then there's the scope, which is the properties that we
00:51:59.757 --> 00:52:03.493 saw up at the top of this file. Those can be passed through and
00:52:03.493 --> 00:52:07.053 accessed inside the HTML, and then the controller also has a
00:52:07.053 --> 00:52:10.788 controller has name, which is. I don't believe is required, but
00:52:10.788 --> 00:52:14.407 essentially kind of a short down name, so peak control. So to
00:52:14.407 --> 00:52:18.026 access anything inside the HTML you would do P control dot CV
00:52:18.026 --> 00:52:21.586 authentication service where inside the TypeScript you would
00:52:21.586 --> 00:52:24.095 do this startup CB authentication service.
00:52:26.765 --> 00:52:30.743 And so yeah, if we look at CART type, it's likely that there's
00:52:30.743 --> 00:52:34.595 going to be cart type up here and we'll likely see CART type
00:52:34.595 --> 00:52:35.605 inside the HTML.
00:52:37.005 --> 00:52:39.495 And we do. So yeah, he control dot cart type.
00:52:40.285 --> 00:52:40.845 Ah.
00:52:42.055 --> 00:52:45.924 And that's essentially how you can pass variables from the
00:52:45.924 --> 00:52:50.186 TypeScript into the HTML itself and same with different services
00:52:50.186 --> 00:52:54.120 and functions too. So for that matter you could also do app
00:52:54.120 --> 00:52:57.399 control dot start timer obviously be some type of
00:52:57.399 --> 00:53:01.661 different function, but you can access functions inside the HTML
00:53:01.661 --> 00:53:02.775 in a similar way.
00:53:03.445 --> 00:53:03.915 So.
00:53:07.955 --> 00:53:12.899 I guess just to give a quick example of the filters, let me
00:53:12.899 --> 00:53:13.805 go back to.
00:53:15.265 --> 00:53:17.465 Globalized currency.
00:53:44.775 --> 00:53:48.078 And so those those filter functions that I was mentioning
00:53:48.078 --> 00:53:51.609 that were in the, I believe it was the under score core file,
00:53:51.609 --> 00:53:54.285 this is what it looks like inside the HTML so.
00:53:56.395 --> 00:54:00.305 Working through here category and product data.
00:54:01.805 --> 00:54:06.111 The translate so form subtotal it's essentially interpolating
00:54:06.111 --> 00:54:08.125 this which it may be getting.
00:54:12.655 --> 00:54:16.043 I guess I'd have to see where exactly it's getting that from,
00:54:16.043 --> 00:54:18.774 but it's essentially grabbing form dot, subtotal,
00:54:18.774 --> 00:54:21.779 interpolating it, and then passing it. That globalized
00:54:21.779 --> 00:54:25.112 currency format. And so this would be formatted as you know,
00:54:25.112 --> 00:54:26.805 U.S. dollar with a dollar sign.
00:54:28.875 --> 00:54:31.465 A point and then two decimals so.
00:54:34.825 --> 00:54:38.474 Just kind of walking through some of the things that you'll
00:54:38.474 --> 00:54:41.758 normally see on the HTML templates. I'll jump back to
00:54:41.758 --> 00:54:42.305 this one.
00:54:43.525 --> 00:54:47.071 We can see these these attributes that are added to
00:54:47.071 --> 00:54:51.298 certain HTML elements. Select set loading widget. This itself
00:54:51.298 --> 00:54:55.253 is gonna be its own directive. If I was gonna search this
00:54:55.253 --> 00:54:59.480 though, chances are not going to find anything except it just
00:54:59.480 --> 00:55:01.525 being used in other locations.
00:55:03.335 --> 00:55:09.516 The best way to try and actually get to this directive is to take
00:55:09.516 --> 00:55:10.265 off the.
00:55:10.995 --> 00:55:14.297 Hyphens and then this should actually bring us to the
00:55:14.297 --> 00:55:15.275 TypeScript file.
00:55:16.715 --> 00:55:19.435 And so now we're inside the loading widget in.
00:55:18.535 --> 00:55:22.233 And if you don't, just to sorry to interrupt real quick for Brad
00:55:22.085 --> 00:55:22.305 Sure.
00:55:22.233 --> 00:55:25.816 and and Brad and Alex, Stanley, if you don't remember anything
00:55:25.816 --> 00:55:29.343 else from this training, you should remember that what do you
00:55:28.375 --> 00:55:28.625 Yeah.
00:55:29.343 --> 00:55:32.926 just said like the kebab case to Camel case and vice versa for
00:55:32.926 --> 00:55:35.315 directive names will help you find stuff.
00:55:36.915 --> 00:55:39.865 There was. Sorry, I was gonna add one more thing, which was?
00:55:42.735 --> 00:55:45.365 They're also often not always, but.
00:55:46.645 --> 00:55:50.773 I don't know other people could chime in their presence 90 to
00:55:50.773 --> 00:55:55.034 95% of the components in angular and in react have the same the
00:55:55.034 --> 00:55:59.362 file name is either the same or very close to the directive name
00:55:59.362 --> 00:56:03.489 right? It's like the name of this file is loading widget. The
00:56:03.489 --> 00:56:07.684 name of the directive is self loading widget so you don't need
00:56:07.684 --> 00:56:11.479 to spend a bunch of time figuring out like what files is
00:56:11.479 --> 00:56:13.875 in. It's like. Well if you were on.
00:56:14.735 --> 00:56:17.399 Like what? Go to purchase dot HTML real quick if you don't
00:56:17.399 --> 00:56:17.985 mind, Justin.
00:56:18.705 --> 00:56:18.865 The.
00:56:19.985 --> 00:56:23.635 You're on here and you see stuff. Purchase cart empty.
00:56:24.435 --> 00:56:28.437 So before I would ever even bother turning that into Camel
00:56:28.437 --> 00:56:32.505 case to find it, I would just look for purchase CART empty.
00:56:34.985 --> 00:56:40.169 And look empty cart. OK, so I opened empty cart. Look at that
00:56:40.169 --> 00:56:45.521 TS file and I look there it is directive, service, SEF purchase
00:56:45.521 --> 00:56:50.955 cart empty. Right. So you don't have to spend 3 minutes per per.
00:56:51.035 --> 00:56:54.771 Sure thing you have to do or per file. You have to find waiting
00:56:54.771 --> 00:56:58.098 for VS code to load its searching because that slows you
00:56:58.098 --> 00:57:01.659 down way too much, right? Just look for something similar to
00:57:01.659 --> 00:57:05.453 directive name. You're probably going to find the TypeScript and
00:57:05.453 --> 00:57:09.072 the HTML for it and what that took us like 5 seconds. So yeah
00:57:07.835 --> 00:57:09.045 Yeah, yeah.
00:57:09.072 --> 00:57:10.005 we're to device.
00:57:09.935 --> 00:57:12.315 That is definitely definitely quicker.
00:57:13.175 --> 00:57:13.655 Umm.
00:57:15.725 --> 00:57:19.480 And then yeah, so I mean jumping in here, as you can see, that's
00:57:19.480 --> 00:57:23.003 the directive name, but the controller as is loading widget.
00:57:23.003 --> 00:57:26.295 So if I was to jump to the HTML of this, we're gonna see
00:57:26.295 --> 00:57:29.760 everywhere calling loading widget control. We could do that
00:57:29.760 --> 00:57:30.395 real quick.
00:57:31.955 --> 00:57:33.515 And as you can see, we get those here.
00:57:37.465 --> 00:57:39.895 Go back to person purchase HTML.
00:57:42.035 --> 00:57:44.735 Overlay in message so like.
00:57:45.635 --> 00:57:49.101 The first thing if you're kind of familiar with HTML like
00:57:49.101 --> 00:57:52.567 these, aren't standard HTML attributes. What these are is
00:57:52.567 --> 00:57:56.093 these are actually like, I guess, the way to think of them
00:57:56.093 --> 00:57:59.678 will be like props to react. This is passing data into this
00:57:59.678 --> 00:58:00.275 directive.
00:58:01.605 --> 00:58:05.904 So if I come here, we can see we have overlay and message as
00:58:05.904 --> 00:58:07.525 bound scope properties.
00:58:08.245 --> 00:58:11.325 Ohh, and we're saying that we want.
00:58:12.205 --> 00:58:15.288 Message to be view state up weight message. So say the
00:58:15.288 --> 00:58:18.595 weight message is just, you know maybe loading or waiting.
00:58:20.655 --> 00:58:24.864 That gets passed into. Here it's a string. Ultimately, we're
00:58:24.864 --> 00:58:29.141 passing it in the scope, so we can then access it in the HTML
00:58:29.141 --> 00:58:32.245 of this directive, and so if we take a look.
00:58:33.955 --> 00:58:35.005 Find message.
00:58:35.895 --> 00:58:36.625 We get those here.
00:58:40.385 --> 00:58:43.998 This right here happens a lot occurs a lot NGF. It's
00:58:43.998 --> 00:58:48.224 essentially angulars like if check so it's saying Ng if there
00:58:48.224 --> 00:58:49.655 is a loading message.
00:58:50.815 --> 00:58:53.275 Ng BIND essentially binds.
00:58:54.475 --> 00:58:58.613 Property values to the HTML and displays it as text. So this
00:58:58.613 --> 00:59:02.275 would render the text inside a P tag and the browser.
00:59:04.215 --> 00:59:07.350 And you can, you know, do these if checks as you normally would.
00:59:07.350 --> 00:59:09.857 So you can have hands and conditionals. You can run
00:59:09.857 --> 00:59:10.725 functions in them.
00:59:12.045 --> 00:59:12.615 Methods.
00:59:13.325 --> 00:59:17.435 And yet, NGF's probably the most common one.
00:59:19.235 --> 00:59:22.853 Ng class is also a way to conditionally render classes
00:59:22.853 --> 00:59:24.365 again similar to react.
00:59:24.985 --> 00:59:25.635 Ah.
00:59:26.485 --> 00:59:28.045 You know how we may have.
00:59:29.325 --> 00:59:30.205 I won't do it well.
00:59:30.865 --> 00:59:34.052 You know, you're kind of have your object back text and then
00:59:34.052 --> 00:59:36.715 maybe some type of logic in there, like a ternary.
00:59:38.245 --> 00:59:42.228 You can use Ng class. There's also this kind of style. This is
00:59:42.228 --> 00:59:43.365 on Ng style which.
00:59:44.225 --> 00:59:47.791 I don't use too often, but this is essentially saying add a
00:59:47.791 --> 00:59:51.238 style. Well I guess Ng style is more like an inline style
00:59:51.238 --> 00:59:53.615 instead of a class is what it would be.
00:59:54.995 --> 00:59:59.455 Add a Z index if the loading widget dot overlay.
01:00:00.675 --> 01:00:02.685 If it is 1000.
01:00:04.375 --> 01:00:06.845 Add a Z index if not inherit.
01:00:09.155 --> 01:00:10.365 I believe that's how that would work.
01:00:12.235 --> 01:00:16.441 But this is essentially the style that'll ohh no it's saying
01:00:16.441 --> 01:00:17.475 Z index with a.
01:00:18.175 --> 01:00:23.310 The C Class is the index with a value of 1000. If there is an
01:00:23.310 --> 01:00:25.545 overlay, if not inherit so.
01:00:28.165 --> 01:00:33.186 Jumping back, we have Ng Hide which essentially will kind of
01:00:33.186 --> 01:00:37.960 you know hide this dev if depending on what the result of
01:00:37.960 --> 01:00:42.487 this logic inside here. So it looks like P control dot
01:00:42.487 --> 01:00:43.145 service.
01:00:43.775 --> 01:00:48.195 Any step is building cart or if it's show empty cart message.
01:00:48.885 --> 01:00:49.555 UM.
01:00:50.535 --> 01:00:53.145 So let me see if I go to control.
01:00:57.705 --> 01:00:58.675 Dot.
01:01:01.585 --> 01:01:04.235 I'm guessing the service is being.
01:01:05.835 --> 01:01:07.185 Would it be inherited here?
01:01:09.535 --> 01:01:13.041 Oh, right here. So it's using the getter for service and then
01:01:13.041 --> 01:01:15.585 it's returning this dot CB purchase service.
01:01:16.395 --> 01:01:16.955 Umm.
01:01:17.945 --> 01:01:18.925 Is how that's working.
01:01:19.605 --> 01:01:23.368 And same with data data translate. This is essentially
01:01:23.368 --> 01:01:27.336 going to uh, you know, convert our translations into text
01:01:27.336 --> 01:01:28.635 inside the browser.
01:01:31.555 --> 01:01:35.554 Another one that we have is Ng repeat. This will essentially
01:01:35.554 --> 01:01:39.619 loop over data and then you know render objects for each item
01:01:39.619 --> 01:01:43.553 inside. So you may be an array so it looks like step inside
01:01:43.553 --> 01:01:47.486 peak control service step. So say if there's four different
01:01:47.486 --> 01:01:51.288 steps it's gonna render inside this dev for each of those
01:01:51.288 --> 01:01:55.484 steps, probably a bit more of a complex example, but say, maybe
01:01:55.484 --> 01:01:59.549 you had a cart full of products and you wanted to render line
01:01:59.549 --> 01:02:00.925 items inside the car.
01:02:01.005 --> 01:02:05.525 It would be Ng repeat items in P control, service CART items and
01:02:05.525 --> 01:02:09.975 then you can kind of build out your you know template for those
01:02:09.975 --> 01:02:12.965 different line items inside the Ng repeat.
01:02:16.945 --> 01:02:21.405 And I think that's probably most of the the important.
01:02:22.905 --> 01:02:24.815 Angular attributes I think.
01:02:26.095 --> 01:02:30.605 Anyone have any questions or any any other points to go over?
01:02:39.085 --> 01:02:39.895 You're great, man.
01:02:40.895 --> 01:02:42.005 No, thanks, Jesse.
01:02:43.565 --> 01:02:45.215 They try for.
01:02:49.255 --> 01:02:52.465 I guess I have a the silly one that I'm curious about.
01:02:51.955 --> 01:02:52.125 Sure.
01:02:54.885 --> 01:02:58.323 Those look like bootstrap styles, so we don't they're
01:02:58.323 --> 01:03:01.760 these are not styled per component, it just bootstrap
01:03:01.760 --> 01:03:03.415 throughout. Is that right?
01:03:05.515 --> 01:03:09.235 These. Yeah. So we use uh, primarily bootstrap. Yeah.
01:03:06.905 --> 01:03:07.195 Yeah.
01:03:09.685 --> 01:03:13.501 In react, we have a few things that we can style per component,
01:03:13.501 --> 01:03:17.258 but it's for a lot of these. In Angular, we never had anything
01:03:17.258 --> 01:03:21.014 like that. It was all bootstrap or custom CSS that you'd write
01:03:21.014 --> 01:03:22.385 somewhere else and Yep.
01:03:21.325 --> 01:03:21.655 OK.
01:03:31.915 --> 01:03:32.605 Ohm.
01:03:34.105 --> 01:03:38.275 Don't know what else to touch on. Anybody have any? Any ideas?
01:03:43.515 --> 01:03:46.685 I guess I can kind of go through on the front end. Is that how
01:03:46.685 --> 01:03:49.352 you would kind of debug this stuff using the Angular
01:03:49.352 --> 01:03:49.855 inspector?
01:03:51.255 --> 01:03:51.915 That would be cool.
01:03:52.485 --> 01:03:53.475 There might be pretty useful.
01:03:56.395 --> 01:03:58.375 Yeah, let's let's take a look.
01:04:35.475 --> 01:04:38.945 So I guess let's go to the cart and I'll add an item.
01:04:50.335 --> 01:04:53.375 And feeling me actually go to the catalog.
01:05:19.955 --> 01:05:22.285 This site has like 22,000 products.
01:05:34.045 --> 01:05:34.695 Ohh man.
01:05:42.255 --> 01:05:44.815 Well, I guess we can just do the catalog here. We don't need to
01:05:44.815 --> 01:05:46.415 add something to the cart specifically.
01:05:53.455 --> 01:05:56.689 Just in this angular inspector. Is this just a browser extension
01:05:56.689 --> 01:05:57.435 you downloaded?
01:05:58.305 --> 01:06:02.295 Yes. And I believe the name is Ng inspect.
01:06:03.225 --> 01:06:03.915 Umm.
01:06:04.115 --> 01:06:07.448 Do you have it as like an unpacked thing, or is it
01:06:07.448 --> 01:06:11.500 actually like through Chrome? And the reason I ask is cause a
01:06:11.500 --> 01:06:15.617 while ago I don't know a couple of those Ng inspectors got got
01:06:15.617 --> 01:06:18.035 either removed off the web store or.
01:06:15.915 --> 01:06:16.325 Right.
01:06:18.695 --> 01:06:20.405 Owned or whatever.
01:06:20.845 --> 01:06:21.585 Yeah.
01:06:21.645 --> 01:06:24.606 And I was wondering if if it isn't one that like if you can
01:06:24.606 --> 01:06:27.813 unpack it and send it, that'd be pretty cool, because even I was
01:06:27.813 --> 01:06:29.095 looking for one other day.
01:06:30.225 --> 01:06:34.015 This is the one that I believe because you're right, when I
01:06:34.015 --> 01:06:35.215 first started here.
01:06:38.675 --> 01:06:42.095 Angular. Yeah, so I had angular dev tools.
01:06:43.465 --> 01:06:46.591 And I don't think this is the one I've I actively use. I think
01:06:46.591 --> 01:06:47.285 it's this one.
01:06:48.275 --> 01:06:49.545 Engine suspect.
01:06:51.285 --> 01:06:55.945 So let me yeah, it's this one tonight to recommend. Ohh cool.
01:07:01.125 --> 01:07:02.485 Our energy detector.
01:07:03.135 --> 01:07:05.929 Yeah, I don't know. There's probably other ones I've had the
01:07:05.929 --> 01:07:07.165 most success with this one.
01:07:08.815 --> 01:07:11.675 Tried and true, but you know what it what? If it works for
01:07:11.675 --> 01:07:12.305 you? Awesome.
01:07:14.685 --> 01:07:18.199 So yeah, essentially you can kind of come here, inspect on
01:07:18.199 --> 01:07:21.415 the front end and you know, we're gonna see the HTML.
01:07:22.145 --> 01:07:27.251 Pretty much lying for line. What we're seeing in the directive
01:07:27.251 --> 01:07:32.438 templates so we can see we have Ng repeats here which is saying
01:07:32.438 --> 01:07:37.463 record ID and probably search catalog product results control
01:07:37.463 --> 01:07:38.435 dot service.
01:07:40.385 --> 01:07:43.931 We have NGFS, we've got the SEF product card thumbnail with
01:07:43.931 --> 01:07:47.476 overlay widget which is the directive itself. That was kind
01:07:47.476 --> 01:07:50.902 of the name that like David said, you know if you need to
01:07:50.902 --> 01:07:54.448 find this, you could either strip it out or maybe just do a
01:07:54.448 --> 01:07:56.515 search for product card thumbnail.
01:07:58.445 --> 01:08:02.453 And then you can even see the, you know the quote UN quote
01:08:02.453 --> 01:08:06.528 props that are getting passed into that. So product ID with
01:08:06.528 --> 01:08:10.536 high index hide the favorites list. So if hide FL is true,
01:08:10.536 --> 01:08:14.476 then this wouldn't have a favorites list, you know on the
01:08:14.476 --> 01:08:18.483 overlay, but it it probably isn't true because we do get a
01:08:18.483 --> 01:08:21.675 favorites list and we can take a look at that.
01:08:23.635 --> 01:08:28.663 The the thing I kind of do with these is the scope is how you
01:08:28.663 --> 01:08:33.609 will kind of look at the data inside angular and so if I was
01:08:33.609 --> 01:08:34.825 to go on scope.
01:08:35.655 --> 01:08:39.552 I don't actually see see this right here because I'm on it
01:08:39.552 --> 01:08:43.778 itself. I see what's above. So one love up. So I always kind of
01:08:43.778 --> 01:08:47.939 click on the one under and then if you go to scope, we can see
01:08:47.939 --> 01:08:52.166 the product card thumbnail with overlay widget controller which
01:08:52.166 --> 01:08:55.005 would relate to this directive right here.
01:08:56.025 --> 01:09:00.282 So a little bit weird, but you do kind of get used to it. And
01:09:00.282 --> 01:09:04.263 so if we click into there we can kind of see we have hide
01:09:04.263 --> 01:09:07.215 favorites list which is false and that is.
01:09:10.115 --> 01:09:11.535 Hide favorites list this right here.
01:09:12.885 --> 01:09:16.319 And we can kind of see all the data that's going on inside this
01:09:16.319 --> 01:09:19.484 directive. So we have our SEV config, which is in a lot of
01:09:19.484 --> 01:09:20.395 these directives.
01:09:22.285 --> 01:09:23.935 And you can kind of look at the different.
01:09:25.505 --> 01:09:28.765 I guess the different settings inside the sub config, so like
01:09:28.765 --> 01:09:31.445 you have it you can look at the dashboard is here.
01:09:34.835 --> 01:09:38.428 Feature set. If you've messed with the app settings, you know
01:09:38.428 --> 01:09:42.021 a lot of them are like clarity dot feature set dot affiliates
01:09:42.021 --> 01:09:44.455 dot enabled. Something along those lines.
01:09:46.685 --> 01:09:49.755 Beyond Seth config, we can see those services that we touched
01:09:49.755 --> 01:09:51.685 on earlier. So here's CB cart service.
01:09:52.865 --> 01:09:57.097 You can see the other services that are inside CV CART service,
01:09:57.097 --> 01:10:01.131 so CV CART service has the CB authentication service that we
01:10:01.131 --> 01:10:04.636 were talking about CB authentication service as view
01:10:04.636 --> 01:10:08.735 state service service strings CVP API which is how you access
01:10:08.735 --> 01:10:09.925 all the endpoints.
01:10:10.545 --> 01:10:12.855 Uh, in kind of cell one.
01:10:13.675 --> 01:10:17.457 And if we close that, yeah, we can kind of see the data that
01:10:17.457 --> 01:10:21.301 that we're looking for. These are the functions themselves or
01:10:21.301 --> 01:10:25.021 maybe this is what's getting passed and it may not be true,
01:10:25.021 --> 01:10:28.741 but you get your product ID, image name, hide wish list and
01:10:28.741 --> 01:10:32.523 it's it's a really easy way to kind of see the data and it's
01:10:32.523 --> 01:10:35.685 usually pretty helpful when you're trying to debug
01:10:35.685 --> 01:10:36.305 something.
01:10:41.525 --> 01:10:42.355 Ohm.
01:10:43.495 --> 01:10:47.144 I guess the last thing I can probably touch on is the the CB
01:10:47.144 --> 01:10:51.031 API on the front end because I I skipped over that there was one
01:10:51.031 --> 01:10:52.825 thing I wanted to touch on so.
01:10:53.765 --> 01:10:57.525 Again, in, in any of these directives, if we go back to
01:10:57.525 --> 01:11:01.755 service, we can see, let's see if this one has it. It does. So
01:11:01.755 --> 01:11:05.985 CVI API, this is what allows you to access all those different
01:11:05.985 --> 01:11:10.147 endpoints inside the under score API folder. So if we were to
01:11:10.147 --> 01:11:12.295 come here and do something like.
01:11:12.945 --> 01:11:15.355 This starts CB API.
01:11:16.155 --> 01:11:18.485 Dot we can just literally do this.
01:11:21.035 --> 01:11:22.495 Will do inventory.
01:11:31.315 --> 01:11:33.195 My Intellisense is not working.
01:11:46.145 --> 01:11:47.795 Not sure where that's not working.
01:11:50.295 --> 01:11:52.895 CB API dot shopping so.
01:11:57.765 --> 01:12:02.431 There we go. OK. Inventory dot and then you can kind of you'll
01:12:02.431 --> 01:12:06.948 have access to those endpoints that are inside the inventory
01:12:06.948 --> 01:12:09.465 file. So we get root URL service.
01:12:11.595 --> 01:12:12.665 Let's just take a look.
01:12:17.995 --> 01:12:23.215 Ohh, I would expect to be able to get to something like this.
01:12:29.065 --> 01:12:29.825 Yeah. OK.
01:12:31.295 --> 01:12:35.455 And then so yeah, you can access those endpoints in this manner.
01:12:45.925 --> 01:12:49.285 And you can pretty much do that in any of these directives. So
01:12:49.285 --> 01:12:52.432 once you kind of learn the the plug and play nature of the
01:12:52.432 --> 01:12:54.085 services and you know, kind of.
01:12:54.795 --> 01:12:57.905 Access the data you need via those services inside the
01:12:57.905 --> 01:13:00.505 TypeScript file and then pass it to the HTML.
01:13:01.825 --> 01:13:03.495 You can pretty much just take it from there and.
01:13:04.425 --> 01:13:07.032 Like I said, everything's night pretty well built out in here,
01:13:07.032 --> 01:13:09.597 and there's a lot of things to reference from, so both in the
01:13:09.597 --> 01:13:10.755 the storefront in the admin.
01:13:18.215 --> 01:13:19.625 Well, I've been talking a lot.
01:13:21.105 --> 01:13:24.095 Anyone else got anything or anything to share?
01:13:30.175 --> 01:13:31.775 Thank you, Justin. That was awesome.
01:13:32.295 --> 01:13:33.015 Thanks, Jesse.
01:13:32.485 --> 01:13:32.835 I'm gonna.
01:13:34.245 --> 01:13:35.275 Yeah. Thank you, Justin.
01:13:34.425 --> 01:13:35.965 I'm here to drop a little early myself.
01:13:34.875 --> 01:13:35.715 Yeah. Thank you.
01:13:37.015 --> 01:13:38.595 Justin, Justin.
01:13:37.495 --> 01:13:37.845 I have.
01:13:38.545 --> 01:13:40.275 And I hope it means that.
01:13:39.315 --> 01:13:39.585 OK.
01:13:46.475 --> 01:13:47.285 Yeah, that was cool.
01:13:51.605 --> 01:13:53.075 I got a question that's bugging me.
01:13:54.145 --> 01:13:54.435 Sure.
01:13:55.505 --> 01:13:59.149 I don't. Can you explain why some of these have a dollar and
01:13:59.149 --> 01:13:59.805 some don't?
01:14:02.305 --> 01:14:05.568 I thought I knew TypeScript TypeScript decently well, but
01:14:02.855 --> 01:14:03.255 Ah.
01:14:05.568 --> 01:14:08.605 I'm not familiar with this by some do and some don't.
01:14:09.575 --> 01:14:13.685 Yeah. The dollars are built in angular services.
01:14:13.985 --> 01:14:14.695 OK.
01:14:15.475 --> 01:14:15.835 Yep.
01:14:15.855 --> 01:14:16.235 Cool.
01:14:17.195 --> 01:14:22.365 Yeah. So, like, uh, scope here allows you to access.
01:14:23.875 --> 01:14:26.905 The same scope that we're seeing here, so.
01:14:26.525 --> 01:14:27.495 Well, OK.
01:14:28.425 --> 01:14:29.595 If you want like.
01:14:28.735 --> 01:14:29.745 That's really interesting.
01:14:30.255 --> 01:14:35.315 Yeah, inside these you can get really janky and do like.
01:14:38.715 --> 01:14:39.735 This stuff.
01:14:40.775 --> 01:14:42.275 Scope dot.
01:14:41.255 --> 01:14:41.565 Hmm.
01:14:43.195 --> 01:14:47.675 Parent dot parent dot parent and like.
01:14:50.525 --> 01:14:51.695 Chain up the scope.
01:14:52.815 --> 01:14:56.999 And then like dot, maybe there's nothing in this one, but that
01:14:55.905 --> 01:14:56.305 Uh.
01:14:56.999 --> 01:15:00.984 would be the same as accessing all these different parents,
01:15:00.984 --> 01:15:05.234 which I mean, I guess sometimes there are times to do that. But
01:15:05.234 --> 01:15:08.753 like say if I'm in this directive here, this product
01:15:06.995 --> 01:15:07.245 Umm.
01:15:08.753 --> 01:15:12.672 card widget overlay and I need something inside the search
01:15:12.672 --> 01:15:16.656 catalog product results grid, I can literally go this stuff
01:15:16.656 --> 01:15:20.641 parent dot parent dot parent dot parent can come up here in
01:15:19.325 --> 01:15:19.685 Ohh.
01:15:20.525 --> 01:15:21.135 Up the chain.
01:15:20.641 --> 01:15:21.105 access.
01:15:21.915 --> 01:15:24.655 This data? Yeah, so it's a.
01:15:23.945 --> 01:15:24.255 Wow.
01:15:26.855 --> 01:15:30.687 That only flows one way, though, so if you are in a child
01:15:30.687 --> 01:15:34.717 directive, you can access the scope of the parents. Where it
01:15:34.717 --> 01:15:38.086 gets tricky sometimes is if you're in like sibling
01:15:38.086 --> 01:15:41.785 directives and you need to access something to adjacent
01:15:41.785 --> 01:15:42.445 directive.
01:15:45.175 --> 01:15:46.605 His methods that do it. I.
01:15:48.045 --> 01:15:50.655 I guess just a quick example is.
01:15:53.935 --> 01:15:55.135 If you were in.
01:15:56.005 --> 01:15:59.346 Say maybe this directive and you had another directive that was
01:15:59.346 --> 01:16:02.373 right here and you needed to access data in both of them,
01:16:02.373 --> 01:16:05.035 like you wouldn't be able to use that scope chain.
01:16:06.205 --> 01:16:06.605 OK.
01:16:06.595 --> 01:16:12.093 One way to do it is there's a broadcast so Angular has these
01:16:12.093 --> 01:16:14.165 built-in services that.
01:16:15.315 --> 01:16:17.285 We can probably find.
01:16:19.625 --> 01:16:23.427 There's a broadcast and on so the on receives it. So if I was
01:16:23.427 --> 01:16:27.167 to do like this dot scope dot broadcast and then pass in the
01:16:27.167 --> 01:16:28.515 variable and a string.
01:16:29.185 --> 01:16:32.888 That would essentially broadcast out to the platform that
01:16:32.888 --> 01:16:36.910 something's changed and for any scope dot on that has the same
01:16:36.910 --> 01:16:39.335 string, it can receive that variable.
01:16:40.615 --> 01:16:40.975 Uh.
01:16:42.295 --> 01:16:46.532 That's one way to kind of pass data around. The other is using
01:16:46.532 --> 01:16:50.769 a service. Essentially you would store the data inside like CV
01:16:50.769 --> 01:16:52.315 authentication service.
01:16:53.035 --> 01:16:56.429 Access CB authentication service inside both directives and
01:16:56.429 --> 01:16:59.595 because it's the parent, you can access it inside both.
01:17:00.405 --> 01:17:00.755 OK.
01:17:01.115 --> 01:17:03.805 And kind of like a triangle that makes sense.
01:17:04.145 --> 01:17:04.775 Yeah it does.
01:17:05.555 --> 01:17:07.285 There's other ways. Almost, like uh.
01:17:09.085 --> 01:17:11.255 I don't know what to call it. Some kind of listener?
01:17:13.465 --> 01:17:17.235 Yeah. It's like a like a parent state, I suppose.
01:17:18.245 --> 01:17:18.615 So.
01:17:19.455 --> 01:17:19.655 Cool.
01:17:23.515 --> 01:17:26.174 And then you can always kind of create a custom service if you
01:17:26.174 --> 01:17:28.579 need to. If if none of these really fit the bill of what
01:17:28.579 --> 01:17:29.465 you're looking to do.
01:17:35.385 --> 01:17:35.605 Cool.
01:17:36.725 --> 01:17:37.165 Don't.
01:17:49.005 --> 01:17:51.789 Uh, we've got about 5 minutes. Anybody got anything cool to
01:17:51.789 --> 01:17:53.645 show off that they worked on this week?
01:18:24.955 --> 01:18:26.535 Not really, not me.
01:18:25.355 --> 01:18:27.509 I don't have anything. No, I don't have anything just yet.
01:18:27.509 --> 01:18:28.385 Hopefully in the future.
01:18:36.285 --> 01:18:37.715 This isn't that cool, but a.
01:18:39.605 --> 01:18:41.695 I don't know my clarity still there.
01:18:44.465 --> 01:18:45.165 Howdy, yeah.
01:18:44.495 --> 01:18:45.125 Not sure.
01:18:46.115 --> 01:18:50.029 I was going to say if you want to do a stress test, we can try.
01:18:50.029 --> 01:18:53.820 I know, I know it's not working through Brandon, but we could
01:18:53.820 --> 01:18:54.615 try doing 50.
01:18:55.555 --> 01:18:58.846 Of the Amazon records at once and see how many images and
01:18:58.846 --> 01:19:00.605 downloads different freaks out.
01:19:03.045 --> 01:19:04.495 That would be funny to watch.
01:19:03.435 --> 01:19:04.485 OK. Yeah, I mean.
01:19:06.915 --> 01:19:09.481 I'd have to go through and delete stuff and we I don't know
01:19:09.481 --> 01:19:12.132 how much time we have, but if you already had it open, if you
01:19:12.132 --> 01:19:13.585 don't, don't worry about it. But.
01:19:14.755 --> 01:19:17.572 I want to keep people late just to watch it image getting filled
01:19:17.572 --> 01:19:20.172 up with or a folder getting filled with tons of images, but
01:19:20.172 --> 01:19:21.385 I thought it would be funny.
01:19:23.235 --> 01:19:23.965 To show.
01:19:24.035 --> 01:19:27.903 Yeah, that's I, I don't have it up, but we can get it up
01:19:27.903 --> 01:19:29.735 hopefully within 3 minutes.
01:19:31.405 --> 01:19:34.823 Those that want to stick and stick, those that wanna leave
01:19:34.823 --> 01:19:36.155 can have a nice Friday.
01:19:37.325 --> 01:19:40.572 Yeah, the the reason that I put you on the spot because I don't
01:19:40.572 --> 01:19:43.768 have enough, but I thought it'd be comedic cause I know Amazon
01:19:43.768 --> 01:19:45.645 has like 10 images like per product.
01:19:46.555 --> 01:19:49.876 And if we had like 50, you'd be like 500 images and a couple
01:19:49.876 --> 01:19:53.142 seconds and I I was kind of, I just thought I was like, you
01:19:53.142 --> 01:19:56.517 know, I didn't really stress test it too much with Amazon, at
01:19:56.517 --> 01:19:59.838 least with overstock, it works, but it might be cool to show
01:19:59.838 --> 01:20:00.055 off.
01:20:01.185 --> 01:20:04.850 Because I I know I mentioned this last week for uh, you of
01:20:04.850 --> 01:20:08.577 those you of I think that was correct. I don't know for you
01:20:08.577 --> 01:20:12.553 guys who there who are there. We talked about a little bit like
01:20:12.553 --> 01:20:16.653 some parallelism stuff I know BL and James weren't here this week
01:20:16.653 --> 01:20:19.075 so we didn't really talk about it but.
01:20:20.905 --> 01:20:26.102 Essentially, we're we're we have like multiple web sockets open
01:20:26.102 --> 01:20:30.974 and we're just pulling product data and images as well, all
01:20:30.974 --> 01:20:33.815 like at the same time in parallel.
01:20:35.175 --> 01:20:38.285 From Amazon and keep his API, so it's kind of cool.
01:20:38.995 --> 01:20:40.775 That's for the the UPC.
01:20:42.275 --> 01:20:47.415 Umm that so the UPC item DB1 is the overstock one and the keep
01:20:47.415 --> 01:20:52.392 API one is for Amazon and then basically keep a will give us
01:20:48.385 --> 01:20:48.855 Yeah, this is.
01:20:49.745 --> 01:20:50.765 Uh, I gotcha.
01:20:52.392 --> 01:20:57.531 just the the name of the file like the image file or something
01:20:57.385 --> 01:20:57.745 Mm-hmm.
01:20:57.531 --> 01:20:58.265 and then.
01:20:59.025 --> 01:21:03.051 You can append I guess like almost like the CDN for Amazon
01:21:03.051 --> 01:21:07.417 North America to the beginning of the image file and that's how
01:21:04.565 --> 01:21:05.355 Ohh yeah.
01:21:07.417 --> 01:21:11.238 you know where it's at. And because of how CEF works, I
01:21:07.555 --> 01:21:08.175 Yeah.
01:21:11.238 --> 01:21:15.331 haven't seen it working. Maybe it does and I'm just dumb or
01:21:15.331 --> 01:21:19.425 something, but I don't think storing the images as bytes or
01:21:19.425 --> 01:21:20.175 bits works.
01:21:21.495 --> 01:21:24.293 In the database, I've only ever seen it work with the physical
01:21:24.293 --> 01:21:27.091 files, so I built out something to like actually just download
01:21:27.091 --> 01:21:27.535 the image.
01:21:28.365 --> 01:21:31.693 And then it'll use that to like make a like a product image
01:21:31.693 --> 01:21:35.297 record. Michael, I don't know if I for me or things blank, but I
01:21:35.297 --> 01:21:37.515 I don't know if anyone else can see it.
01:21:39.485 --> 01:21:40.475 Moving stuff, man.
01:21:42.625 --> 01:21:44.175 Stop and start here in a moment.
01:21:45.635 --> 01:21:46.955 You sound like 50 though.
01:21:45.815 --> 01:21:47.165 OK, now I can see stuff.
01:21:48.535 --> 01:21:50.185 You know, we only worry about that many.
01:21:52.665 --> 01:21:54.855 Which did like 50 or something just in case.
01:21:55.685 --> 01:21:58.195 And let me just drop it into the theory.
01:21:59.445 --> 01:22:00.335 You 50.
01:22:00.555 --> 01:22:03.982 Because I've purposely not tested it with a ton at once,
01:22:03.982 --> 01:22:07.468 only because their API does limit you to pretty much like
01:22:07.468 --> 01:22:10.954 300 over the course of like an hour, which isn't a lot of
01:22:10.535 --> 01:22:13.546 Well, that's that's about to be the weekend. We'll be we'll be
01:22:10.954 --> 01:22:11.495 products.
01:22:13.546 --> 01:22:13.785 fine.
01:22:14.135 --> 01:22:16.325 Yeah, I thought like, oh, whatever.
01:22:17.275 --> 01:22:18.515 Yolo, right.
01:22:18.935 --> 01:22:19.205 Which?
01:22:19.765 --> 01:22:21.975 I have to select however many I selected over here, huh?
01:22:21.365 --> 01:22:24.204 But it's good to it's it's probably good to know what the
01:22:24.204 --> 01:22:27.386 limitations are anyways outside of like how many queries you can
01:22:27.386 --> 01:22:28.805 do in a given period of time.
01:22:29.435 --> 01:22:29.815 Yeah.
01:22:29.905 --> 01:22:32.265 Team is 60. That's 45 AM.
01:22:30.955 --> 01:22:31.495 Umm.
01:22:33.135 --> 01:22:36.164 Yeah. And we could just save that and toss it and see what
01:22:36.164 --> 01:22:38.885 happens. I guess just have that folder open for the.
01:22:39.605 --> 01:22:43.518 It's kinda and it might be like ohh that would give it a big
01:22:43.518 --> 01:22:47.430 deal, right? But trust me, if you just write a C# program to
01:22:47.430 --> 01:22:51.600 download one image after another one at a time like it that many
01:22:51.600 --> 01:22:53.395 images takes a while, right?
01:22:54.655 --> 01:22:59.103 Like I think with Overstock downloading just under 300 not
01:22:59.103 --> 01:23:03.702 in parallel, probably took like a couple of minutes like 3-4
01:23:03.702 --> 01:23:04.305 minutes.
01:23:05.765 --> 01:23:08.467 So because it's getting them one at a time. So but if you
01:23:08.467 --> 01:23:11.355 download them in parallel, it's like down to like 30 seconds.
01:23:12.165 --> 01:23:15.484 And it seemed like Amazon's API for the image downloading was
01:23:15.484 --> 01:23:18.802 even more responsive than than the overstock one, because the
01:23:18.802 --> 01:23:22.335 overstock one is like a mishmash of, like, let's say, Walmart and
01:23:22.335 --> 01:23:25.439 blah blah blah, and a bunch of people have some CDNS that
01:23:25.439 --> 01:23:28.597 aren't as responsive or great as Amazon's. But when you're
01:23:28.597 --> 01:23:31.862 querying Amazon for images, it seem to like just it was just
01:23:31.862 --> 01:23:35.074 exploding, just sending us everything immediately. So I was
01:23:35.074 --> 01:23:35.555 like, OK.
01:23:36.655 --> 01:23:39.245 I'm kind of curious how this would look if you had like a.
01:23:40.055 --> 01:23:41.725 A ton coming in.
01:23:43.245 --> 01:23:45.825 There's 290 images right now.
01:23:43.405 --> 01:23:43.985 But yeah, I.
01:23:49.105 --> 01:23:52.740 You should show the thumbnails too for the for the dramatic
01:23:52.740 --> 01:23:56.375 effect or you sorting by date or how do you have it sorted?
01:23:55.575 --> 01:23:58.175 I think they are sorted by date. Yeah, they were showing up top.
01:23:57.555 --> 01:23:58.155 OK.
01:23:59.025 --> 01:24:01.798 I guess we'll see. Ohh are your your your uh sending an
01:24:01.798 --> 01:24:03.035 overstock request though?
01:24:03.655 --> 01:24:04.385 Look at your thing.
01:24:03.735 --> 01:24:04.565 Ohh shocks.
01:24:06.435 --> 01:24:07.525 Got. Got him.
01:24:07.215 --> 01:24:07.875 Cancel that.
01:24:10.275 --> 01:24:13.531 You do Amazon and select the I don't know if it's if that's
01:24:10.915 --> 01:24:12.015 That patch.
01:24:13.531 --> 01:24:16.569 technically an overstock sheet or I was, oh, it's going
01:24:13.995 --> 01:24:14.585 Ohh well.
01:24:16.569 --> 01:24:17.545 anyways, too late.
01:24:19.115 --> 01:24:21.085 And what? How would ever get?
01:24:23.065 --> 01:24:23.565 Ohh.
01:24:24.995 --> 01:24:25.395 Wow.
01:24:25.195 --> 01:24:25.915 Hello there.
01:24:28.675 --> 01:24:30.025 Little under 100 right now.
01:24:31.695 --> 01:24:32.465 99.
01:24:35.315 --> 01:24:38.027 Let's do the Amazon one, because Amazon one will be way more
01:24:38.027 --> 01:24:38.515 impressive.
01:24:39.995 --> 01:24:43.722 And and what this is doing just so everyone knows this is
01:24:40.185 --> 01:24:41.175 And I do the same one.
01:24:43.722 --> 01:24:47.963 basically like reaching out to a third party API asking for a set
01:24:47.963 --> 01:24:51.818 of products it's create, it's doing all the mapping so like
01:24:51.818 --> 01:24:55.674 cuz it's some arbitrary object or schema type stuff that we
01:24:55.674 --> 01:24:59.786 have no control over and we're mapping that all into a bunch of
01:24:59.786 --> 01:25:03.834 fields for a product and then we're downloading the images and
01:25:03.834 --> 01:25:07.561 then creating product image records for that to basically
01:25:07.561 --> 01:25:09.295 associate the file on disk.
01:25:09.925 --> 01:25:14.286 In your images directory to. I guess the product image so that
01:25:14.286 --> 01:25:18.577 basically when someone gets a shipment of physical like boxes
01:25:18.577 --> 01:25:22.937 right like because it's projects bid so if they get a bunch of
01:25:22.937 --> 01:25:27.436 boxes of products they're going to sell, they can just upload an
01:25:27.436 --> 01:25:31.797 Excel spreadsheet essentially for the shipping manifest and it
01:25:31.797 --> 01:25:36.157 will automatically create all the products in SEF with all the
01:25:36.157 --> 01:25:39.825 fields that they hopefully all the fields they want.
01:25:40.015 --> 01:25:41.475 And all the images too.
01:25:42.105 --> 01:25:44.493 So all they have to do is basically set a price, maybe
01:25:44.493 --> 01:25:46.055 tweak a couple fields if they want.
01:25:46.845 --> 01:25:50.078 And that's it. They have a product they can use. So it's
01:25:50.078 --> 01:25:50.815 kind of cool.
01:25:50.195 --> 01:25:52.755 And I'm missing an Amazon she here?
01:25:54.365 --> 01:25:56.935 Umm do you need one? I can send you one.
01:25:57.195 --> 01:26:00.723 Possible. Yeah, because this guy's not liking missing
01:25:58.995 --> 01:25:59.525 Uh.
01:26:00.723 --> 01:26:01.245 columns.
01:26:01.475 --> 01:26:04.845 And also I'll just say it is passed too. So if you guys have
01:26:04.845 --> 01:26:05.065 any.
01:26:05.785 --> 01:26:09.686 Any things to do? Feel free please. Even if you're new to
01:26:09.686 --> 01:26:13.789 go, no ones holding it against you. You're gonna have to cut
01:26:13.789 --> 01:26:17.959 some stuff out of this one. Just so you know. But I put it in
01:26:17.959 --> 01:26:18.295 chat.
01:26:19.045 --> 01:26:21.962 That has 2000 records in it, so you're not going to want to do
01:26:19.125 --> 01:26:19.495 2.
01:26:21.962 --> 01:26:22.795 that many at once.
01:26:23.845 --> 01:26:25.575 It will fail but.
01:26:27.235 --> 01:26:30.215 Is it uploading? What's going on? I can't tell.
01:26:29.705 --> 01:26:31.075 Teams and teams.
01:26:31.425 --> 01:26:33.965 There we go. Yeah. It's just a just a teams moment.
01:26:51.485 --> 01:26:54.534 Yeah, I would say only copy. You're gonna copy the header row
01:26:54.534 --> 01:26:55.025 obviously.
01:26:55.845 --> 01:26:58.939 Because you're going to overwrite whatever is overstock
01:26:56.185 --> 01:26:57.515 Yeah, let's just get that.
01:26:58.939 --> 01:27:01.867 one, but do like 50 or something. Don't don't go too
01:27:00.835 --> 01:27:01.695 That 51.
01:27:01.867 --> 01:27:04.795 crazy because I've I've not tested that many before.
01:27:02.905 --> 01:27:04.075 It's more than once.
01:27:06.215 --> 01:27:09.372 Honestly, I've only done like 10 at a time, so I'm sure 50 will
01:27:09.372 --> 01:27:09.865 work. But.
01:27:14.025 --> 01:27:17.503 I just another API will freak out if you hit zero tokens like
01:27:17.503 --> 01:27:20.195 it's just not gonna give you anything back and.
01:27:21.625 --> 01:27:25.787 No one wants to wait one minute per five products and a sheet of
01:27:25.787 --> 01:27:26.875 2000 products so.
01:27:27.895 --> 01:27:31.885 I figured I would just kill the the request if that happened.
01:27:37.255 --> 01:27:39.825 Unless someone wants to wait like 6 hours to like you know.
01:27:41.985 --> 01:27:43.965 Get their get their stuff uploaded.
01:27:44.975 --> 01:27:48.047 I mean, I know I do. I I'm getting paid by the hour to
01:27:48.047 --> 01:27:49.945 upload stuff from an Excel sheet.
01:27:50.855 --> 01:27:54.845 Yeah, the, I mean I'm, I'm sure they unfortunately have someone
01:27:54.845 --> 01:27:57.525 who has to like do this all day currently.
01:27:58.515 --> 01:27:59.045 Hub.
01:28:00.285 --> 01:28:03.525 Whenever they get a shipment in which is pretty painful, but.
01:28:05.915 --> 01:28:07.185 That's why we exist.
01:28:09.945 --> 01:28:11.255 389.
01:28:12.285 --> 01:28:13.655 I see where we get to.
01:28:15.365 --> 01:28:21.125 OK. I think on average in about 10, so should get like 500 more.
01:28:25.205 --> 01:28:27.575 389 so like 700 ish maybe?
01:28:26.455 --> 01:28:30.429 And these are all polling from Amazon, from their respective
01:28:29.645 --> 01:28:30.195 Yeah.
01:28:30.429 --> 01:28:31.015 products.
01:28:35.055 --> 01:28:36.355 Maybe more than 700.
01:28:40.575 --> 01:28:41.015 Sometime.
01:28:41.065 --> 01:28:41.395 OK.
01:28:41.075 --> 01:28:41.645 And if.
01:28:42.435 --> 01:28:45.416 And if you want you can check the database and you just show
01:28:45.416 --> 01:28:48.445 off like how much data we just pulled in that little what was
01:28:48.445 --> 01:28:50.155 that like 20 seconds or something?
01:28:51.435 --> 01:28:52.255 What is the products?
01:28:51.575 --> 01:28:52.135 I don't know.
01:28:53.365 --> 01:28:56.097 Yeah, go to products that product and then just scroll to
01:28:56.097 --> 01:28:56.615 the bottom.
01:29:07.815 --> 01:29:09.095 1000 began.
01:29:10.965 --> 01:29:14.372 And just look at the top 50. So as you can see and it's too bad
01:29:14.372 --> 01:29:16.235 David's not here because he could.
01:29:16.995 --> 01:29:19.315 Tim could totally see how this would really look, but.
01:29:20.025 --> 01:29:22.471 You can see the LPN is the custom key, so that's what
01:29:22.471 --> 01:29:25.234 people are actually going to be scanning with a barcode when
01:29:25.234 --> 01:29:26.275 they're walking around.
01:29:27.365 --> 01:29:30.963 So that's kind of cool, because if we had to like pull out like
01:29:30.963 --> 01:29:34.447 pull the product in a package by the barcode on a package, it
01:29:34.447 --> 01:29:36.695 would just be get by custom key, right.
01:29:38.895 --> 01:29:42.222 So that's pretty neat and yeah, well, like as you can see like
01:29:42.222 --> 01:29:45.338 in the Jason attributes, those are all the things like the
01:29:45.338 --> 01:29:48.453 product attributes. So like maybe like color or maybe they
01:29:48.453 --> 01:29:51.727 have like a specific size like it was a T-shirt be like Excel
01:29:51.727 --> 01:29:55.106 would be in like the size thing for that a bunch of other stuff
01:29:55.106 --> 01:29:58.433 in there even like bullet point specifications would be in the
01:29:58.433 --> 01:30:01.443 serializable attributes. And then I generate the SEO URL
01:30:01.443 --> 01:30:04.294 using the title using some regex stuff and then short
01:30:04.294 --> 01:30:07.145 description, description, brand name, blah blah blah.
01:30:07.405 --> 01:30:11.114 Even some dimensions in there as well, including the units of
01:30:11.114 --> 01:30:13.985 measure. So it populates a good chunk of stuff.
01:30:14.915 --> 01:30:18.071 The only thing I'm not parsing through because it would
01:30:18.071 --> 01:30:21.339 actually be hours would be pricing and I don't think they
01:30:21.339 --> 01:30:24.551 want pricing automatically autofilled and there would be
01:30:24.551 --> 01:30:28.157 like fifty sources for pricing too. So how would you know which
01:30:28.157 --> 01:30:28.945 ones the best?
01:30:32.015 --> 01:30:34.085 But yeah, pretty cool.
01:30:34.985 --> 01:30:38.415 In my opinion, maybe I'm just nerdy, but either I.
01:30:37.105 --> 01:30:39.687 This is a legit. Yeah. No, that's that's pretty cool
01:30:39.687 --> 01:30:40.515 automation, dude.
01:30:41.905 --> 01:30:43.915 Resident have them do all those 50 by hand.
01:30:45.255 --> 01:30:49.791 You take you like 5 days. It just so it like it wouldn't
01:30:49.791 --> 01:30:54.485 field at a time. It would be bad. But yeah, no, it's cool.
01:30:53.405 --> 01:30:54.485 Good job TMK.
01:30:55.975 --> 01:31:00.471 Well, thank you to the Internet because without it there would
01:31:00.471 --> 01:31:02.255 be no API's and stuff so.
01:31:03.725 --> 01:31:04.185 Yeah.
01:31:04.895 --> 01:31:05.595 That's pretty cool.
01:31:09.535 --> 01:31:13.529 That's that's all I had to show off. I guess terms of something.
01:31:13.529 --> 01:31:17.399 Something cool that's, you know, honestly, the hardest part of
01:31:17.399 --> 01:31:21.269 that was really just wrapping my head around like the business
01:31:21.269 --> 01:31:24.955 logic of, like, what do they actually need and what's a way
01:31:24.955 --> 01:31:28.887 to do it that isn't going to be like a 1020 minute like request
01:31:28.887 --> 01:31:32.634 of just processing stuff one at a time. So yeah, it's pretty
01:31:32.634 --> 01:31:33.125 awesome.
01:31:34.185 --> 01:31:34.535 Nice.
01:31:36.175 --> 01:31:39.357 I don't know if anyone had anything else to talk about or
01:31:39.357 --> 01:31:42.155 mention or anything, or we're now 10 minutes over.
01:31:42.895 --> 01:31:47.078 But if not, I think we're good to uh, break out and enjoy your
01:31:47.078 --> 01:31:48.405 weekends, hopefully.
01:31:59.645 --> 01:32:01.285 Guess adjusted yet didn't have anything.
01:32:03.425 --> 01:32:06.235 Happy weekend. Enjoy all.
01:32:05.165 --> 01:32:06.835 Yeah, happy weekend. Happy Friday.
01:32:08.925 --> 01:32:09.495 See ya.
01:32:09.755 --> 01:32:11.015 Have a good weekend everybody.
01:32:10.005 --> 01:32:10.305 Yep.
01:32:10.185 --> 01:32:12.225 Alright, happy Friday everyone. Take care.
01:32:11.015 --> 01:32:12.065 Y'all have a good weekend.
01:32:12.715 --> 01:32:13.455 At the hospital.
01:32:14.385 --> 01:32:15.115 Alright, see ya.
01:32:14.775 --> 01:32:15.505 Adios.
01:32:17.665 --> 01:32:23.826 Yeah, that was the the widest audio server PMK. He's like he's
01:32:23.826 --> 01:32:24.315 like.