Diary Work 22/11/2019

1.CRUD object field (continue)

Today, I must finish the crud function of object in my team project. Objects field is pretty similar Categories so I just copy it. Every thing done in 30 minute. Now I need push the code to github and delete the branch local and remote.

2.Declare global Url

Yesterday, when I deploy my project to VPS, Every thing is good, excepted 1 thing is crud function. I used restful Api to get data from my backend which is Laravel, when I did in local I declared url to get data is localhost, but when deploy to VPS the url can’t not is loaclhost which must be my IP of VPS is 149.28.xx. And I need to changed all my file had url localhost to 149.28.xx by manual. It quite ridiculous sotoday, I need to fix it. I was think, if I change one file or const and all the file will change, that’s so good. I search in the internet and found the pieces of code can handle my problem. I need to create a file and write a const url I want and export it. The other I want to use it, I just import file and use these url, everything was done. My problem was resolved.

3.CRUD bill field

Next, I will finish crud function of bill, similar to another field I just copy from the old one

4.CRUD size field curd size

This field like other field, copy and copy. Notice,when create component in angular, if you don’t specify the module for component, it will automatically import to app module, and if you have some reason delete that component. BUM, you have a fatal error, the cause is when component’s imported to app module and it will find that component but it was deleted. The solution is delete that component which was imported to app module. This problem was taken me 30 minute. such problem !!!Backend I use Laravel and with every crud function I just copy and change the name. I met some problem to it.

  • My project has Object field and when I create model and seeder Object, it error because the name Object is namesake with Laravel core and throw fatal error. That’s a lesson
  • I copy a lot so I need change the name a lot too and I found some tip trick. I just select the I want to change and push Ctrl+Alt+Shift+J and it will select all the name I was chose on the file. I can easily rename all the name. That helps a lot, thank webstorm !!!

5.CRUD color field Color field is the final crud function I need to work today. After worked a lot crud function before This function I finish pretty fast and no any problem I was faced. Everything work perfectly.

1 comments On Diary Work 22/11/2019

Leave a reply:

Your email address will not be published.

Site Footer

Sliding Sidebar

Facebook