prabhakarpd7284 / lab-booking-portal

Lab slots booking webpp based on laravel framework using fullcalender scheduler library and paper dashboard template.
MIT License
0 stars 2 forks source link

Add data from excel sheet to database #2

Open prabhakarpd7284 opened 5 years ago

prabhakarpd7284 commented 5 years ago

Currently admin has to add tool information one-by-one. The aim is to make this job easier. The admin should be able to update lab equipment information by just uploading an excel sheet containing all lab equipment information in proper format.

https://itsolutionstuff.com/post/laravel-56-import-export-to-excel-and-csv-exampleexample.html http://www.expertphp.in/article/laravel-5-maatwebsite-import-excel-into-db-and-export-data-into-csv-and-excel https://www.kodementor.com/laravel-excel-import-and-export-example-from-scratch/

bhu800 commented 5 years ago

bhu800

prabhakarpd7284 commented 5 years ago

To avoid ldap login, try this.

  1. comment all ldap authentication code in app/Http/middleware/RedirectIfauthenticated.php
  2. Add a username and password in db of ur choice.
  3. Login using newly added username and password. See if it works.
bhu800 commented 5 years ago

sorry sir, was out of town for some time... this is giving error... Screenshot (114)

prabhakarpd7284 commented 5 years ago

Can you upload app/Http/middleware/RedirectIfauthenticated.php file

bhu800 commented 5 years ago

you asked to comment all ldap authentication code... RedirectIfAuthenticated.zip

prabhakarpd7284 commented 5 years ago

You have to comment only ldap verification part in it.

prabhakarpd7284 commented 5 years ago

Basically you comment from line 27-127 only in the file that you've sent.

bhu800 commented 5 years ago

Screenshot (115) on commenting 30-127 lines...

prabhakarpd7284 commented 5 years ago

your mysql configuration is causing problems.

prabhakarpd7284 commented 5 years ago

try updating config/database.php and .env files accordingly.

bhu800 commented 5 years ago

error resolved but still it is redirecting to same page with being logged in

bhu800 commented 5 years ago

problem solved...

bhu800 commented 5 years ago

it was due to that i made user email and password from phpmyadmin while app was trying to match hashed password... so i then registered from /register page and then used that user name and password...

prabhakarpd7284 commented 5 years ago

good job. Now you can focus on the actual issue here. Keep going.

bhu800 commented 5 years ago

sir tools import export method via excel sheet is now working properly...

bhu800 commented 5 years ago

Screenshot (116)

bhu800 commented 5 years ago

but there is a issue that it only download tools data in xlxs format ... will try to do change it so that user have option to download it in xls, csv or xlxs format...

bhu800 commented 5 years ago

also should I do it's styling also...

bhu800 commented 5 years ago

also I wanted to ask how is someone assigned admin boolean in our system... as I made myself admin from phpmyadmin... also it is showing option to add tools for both admin and normal user...

prabhakarpd7284 commented 5 years ago

Only an admin should be able to make other user an admin. This functionality also needs to be added. I'll make a separate issue for that. Currently, its done by changing value in database.

Add tools should only be accessible by a user who has admin privileges. Try verifying this logic by logging by another user who is not an admin.

bhu800 commented 5 years ago

yes for normal user(non-admin) it is redirecting to booking calender page....

bhu800 commented 5 years ago

but there is a issue that it only download tools data in xlxs format ... will try to do change it so that user have option to download it in xls, csv or xlxs format...

Screenshot (117)