Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data from excel sheet to database #2

Open
prabhakarpd7284 opened this issue Jul 1, 2019 · 22 comments
Open

Add data from excel sheet to database #2

prabhakarpd7284 opened this issue Jul 1, 2019 · 22 comments
Assignees
Labels
enhancement New feature or request

Comments

@prabhakarpd7284
Copy link
Owner

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/

@prabhakarpd7284 prabhakarpd7284 added the enhancement New feature or request label Jul 1, 2019
@bhu800
Copy link

bhu800 commented Jul 3, 2019

bhu800

@prabhakarpd7284
Copy link
Owner Author

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
Copy link

bhu800 commented Jul 7, 2019

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

@prabhakarpd7284
Copy link
Owner Author

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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

@prabhakarpd7284
Copy link
Owner Author

You have to comment only ldap verification part in it.

@prabhakarpd7284
Copy link
Owner Author

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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

@prabhakarpd7284
Copy link
Owner Author

your mysql configuration is causing problems.

@prabhakarpd7284
Copy link
Owner Author

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

problem solved...

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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
Copy link
Owner Author

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

Screenshot (116)

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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
Copy link

bhu800 commented Jul 7, 2019

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

@bhu800
Copy link

bhu800 commented Jul 7, 2019

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
Copy link
Owner Author

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
Copy link

bhu800 commented Jul 7, 2019

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

@bhu800
Copy link

bhu800 commented Jul 8, 2019

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants