Posts

Showing posts from March, 2021

in skool project what i have done till now

 test , testmarks ,subjects ,syllabus ,tietable

imp note

 backend mein rails-react application mein backend ke controllermein  return mein data ya @data ja raha hai ya nai  yeh jaroor dekhna hai humko

when I want to take another table column in react and give an error then what to do

 before @homeworks = @homeworks.map{|m| m.as_json.merge(section: m.section.name, standard: m.standard.standard, subject: m.subject) } after : we user try method    @testmarks = testmarks.map{|m| m.as_json.merge(testmark: m, subject: m.test.try(:subject)) } and in the frontend we use this code <td>{testmark.subject}</td> we can take this code directly 

if component we have dynamic in the form of id and we want this name in the index section then what we will do

 Ans:  we will change all attirbutes in the row section also and can check that last data through the console This is the best method that we can check this by the console that then we will find that 

Request is not going to backend and blank screen will show why

 because the condition is not satisfied all conditions is not satisfied. if comment the condition then submit then it can be submit in the handleSubmit event.

Add Another Component Identity in Another Table in index section

    Each do loop lagayenge::::: in the addresses controller  all_addresses = [] addresses.each do |address|  all_addresses << [address, address.user]    return render json: {status: 200, data: { addresses: all_addresses }, message: "all addresses list"} in the frontend  ::: will use debugger and find the  adddresses.addresses[0][] <td>{address[1].name}</td>  ::: will use it in the front end array [1] will use because data will come in the form of array one by one so.

why react appliation is not submitted

 handlesubmit mein debugger lagakar check karo uski condition mein debugger lagakar check karo servie aur action mein dekho kaheen kuch dikkat toh ni sabse pehle debugger lagao condition meinagar condition satisfied nai hoti hai toh debugger nai rukeka.

user roles add in user table with checkbox

 Step 01:  Add this method in constructor       user_role: {         student_role: false,         parent_role: false,         teacher_role: false,         class_teacher: false,       }, Step 02: Bind  HandleRolechange Condition:     this.handleIsRoleChange = this.handleIsRoleChange.bind(this); Step 03: Made a Function for HandleRoleChange    handleIsRoleChange(event) {     if (event.target.name == "student_role"){       if (this.state.user_role.student_role == false){         this.setState({           user_role: { student_role: true },         });       }       else if(this.state.user_role.student_role == true){         this.setState({           user_role: { student_role: false }, ...

recent updates and errors - skool app

 superadmin mein route id ka column hi nai aa raha hai... vehicle create ok but notification message is not shown if any error vehicle delete ok vehicle edit : not ok  user new : no user edit delete show : yes done students create ho raha hai nai ho raha hai toh repeat kiya hai agar...par koi message show nai ho raha hai... student crud : full working.. exam ; full crud vehicle : edit is not working and status is 0 vehicle create : ok vehicle id is 0  staff page is very big correct it  staff ke create mein message ja rahe hain isi tarah aur cheejon mein bhi karo mobile no par message ata hai staff par aisa hi aur mein bhi karo staff full crud ok  edit is also ok jo staff hai wih user hi hoga kya ana chahiyeh user mein nai aa rahe hain check karo student results crud ok test crud ok test marks is same as tests so changing that and taking dynamic test in that  notice is full working but which is working we should show at the student section to that of that cl...

debugging

 how to debugging and error finding in React  step 01: debugger lagao har jagah agar debugger nai rook raha hai means data hi nai aa raha hai step 02: console.log lagao ki data aa raha hai ki nai  step03: sab cheej dekho thik se kiya hai import ya nai har jagah par jahan par nai hua hai wahan par karke dekho step 04: kafi jagah undefined ki error aati hai  step 05: backend mein data tab jata hai jab aap fetch ya axios se api call karte ho  step 06: action mein jo user.push hai woh app,js mein path diya gaya hoga and upar usko import kiya gaya hoga. step 07: backend par api ja rahi hai ki nai aur ja rahi hai toh wahan se kya success aa rah ha ki nai... jahan api hum call karte hain network se waheen se check karo ki yeh data call ho bhi raha hai ki nai... service se call hoti hai api.. step 08:  network mein jo api jati hai usmein dekho response kya aa raha hai.. step 09: jo red mein hai network mein emans usmein error hai.. step 10:  user && us...

heroku app link and heroku link - crud project

 heroku link https://reactreducrud.herokuapp.com/ link https://codeburst.io/redux-a-crud-example-abb834d763c9

deploy react redux at heroku

  Deploy React Application On heroku 1- gir add. 2- git commit -m "first commit" 3- add Heroku remote  4-  heroku buildpacks:set mars/create-react-app 5-  heroku config:set JS_RUNTIME_TARGET_BUNDLE='/app/dist/*.js' 6- git push heoku master 7- Create  static.json  into root directory      Put code in to static.json {   "root": "dist/",   "routes": {     "/**": "index.html"   } } 8- heroku open

redux crud

 https://twitter.com/intent/tweet?text=“In”%E2%80%8A—%E2%80%8APratik Chakravorty https%3A%2F%2Fcodeburst.io%2Fredux-a-crud-example-abb834d763c9%3Fsource%3Dsocial.tw