Time flies, this week is pretty fast. It might be due to the holiday on Monday or just the joy of development. This week, I was assigned to start developing the system. In the beginning, my first thought of developing the main page was why this is different from designing the prototype. I was confused with the styling of the buttons, columns, and navigators. Because of that, I noticed that rather than styling the pages, I should focus on developing an actual workable function. It is useless when the page is beautiful but without any function.
I had developed the main page for two days, but Mr. Peter required me to develop the customer page first. He mentioned that I should prioritize developing a customer page because the main page needs to search for the customer when placing orders. I listened to him and started working on the customer page. The customer page is different from the main page because it contains a table with a lot of data. The solution for displaying the data is using the .map function to map and display the customer data on the table. However, I was confused with the add address functions. In this customer page, the user can add as many customer addresses as they like. I am not familiar with developing such a function, thus I googled and tried to get some tips.
Also, I noticed that React-hook-Form has provided a method called useForm that helps make a form. The userForm method has successfully reduced the length of my code and I was happy with it. But I still keep the original version of the code as a copy. In case the userForm method has some problem, I am able to use another method to complete my customer page. Besides that, I tried to download and use the mkcert to create a local certificate. This certificate allows me to make my page secure and helps me to view the tokens.
At the end of this week, I had some part of creating customer details, creating the customer details and main page. I will continue my task next week and complete the create and edit function on the customer page. I keep my copy of the code in the server. This ensures that my work will not disappear on the next week.
