Skip to content

Commit

Permalink
Merge Tenderos admin-page to project (#1)
Browse files Browse the repository at this point in the history
* First commit

* CRUD approved mails

* Remove unused dependencies

* Add auth

* Sign in in other page

* Auth working. Implemented UI components

* Create readme

* Create deployment.md file

Co-authored-by: Esteban Arocha <e.arocha@ukko.mx>
Co-authored-by: “Samantha <samsolis@tec.mx>
  • Loading branch information
3 people authored May 26, 2020
1 parent e232bce commit d81fa18
Show file tree
Hide file tree
Showing 120 changed files with 55,312 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# Node.js dependencies:
node_modules/
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.env
package-lock.json
# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
12 changes: 12 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Deployment
This web app will be deployed in a cloud service that is not defined yet.

> Note: This will be redefined on further agreements with the client.
## How to manually deploy the web application on localhost:3000:
1. Install NodeJS.
1. Download the repository.
1. Add Firebase environment variables to .env file (described in README.md)
1. Run "npm install"
1. Run "npm run local" to run on localhost:3000
1. Open Localhost:3000
104 changes: 102 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,102 @@
# tenderos_web
Acceso por web de la App de recepción de rutas para Blue People
# Web Tenderos

Manages the users of the application, this is a dashboard that is ready to implement new administrative tools.

## Table of contents

* [Client Details](#client-details)
* [Environment URLS](#environment-urls)
* [Da Team](#team)
* [Technology Stack](#technology-stack)
* [Management resources](#management-resources)
* [Setup the project](#setup-the-project)
* [Running the stack for development](#running-the-stack-for-development)
* [Stop the project](#stop-the-project)
* [Restoring the database](#restoring-the-database)
* [Debugging](#debugging)
* [Running specs](#running-specs)
* [Checking code for potential issues](#checking-code-for-potential-issues)


### Client Details

| Name | Email | Role |
| ------------------ | ------------------------ | --------------------- |
| Aldo Lares | alares@bluepeople.com | Senior Sales Analyst |


### Environment URLS

* **Production** - [TBD](TBD)
* **Development** - [TBD](TBD)

### Da team

| Name | Email | Role |
| ------------------------ | -------------------------- | ----------- |
| Arturo Cantú Cisneros | a0119641@gmail.com | Development |
| Esteban Arocha Ortuño | estebanarocha1@gmail.com | Development |
| Samantha Solis Pascacio | a01039412@itesm.mx | Development |
| Valentin Trujillo García | alexandro4v@gmail.com | Development |

### Technology Stack
| Technology | Version |
| -------------- | -------------|
| NodeJS | 10.16.0 |
| React | 16.13.1 |
| Firebase | 7.14.4 |
| Firebase Admin | 8.12.1 |

### Management tools

You should ask for access to this tools if you don't have it already:

* [Github repo](https://github.com/ProyectoIntegrador2018/tenderos_web)
* [Backlog](https://teams.microsoft.com/_#/school/tab::66092c4e-5ee6-4852-99d1-607f82abf948/Proyecto?threadId=19:242005db4c744d77bed8da3072cb3e82@thread.tacv2&ctx=channel)
* [Documentation](https://drive.google.com/drive/u/0/folders/1LIWhHVsdTVLpmetW2GNYXAYw_jIL3jgw)

## Development

### Changelog v0.1 - Admin Dashboard
- Added HU012 User Admin Dashboard

### Rules of Git

Using a branch for each use case and an extra branch for general development and testing the team will work on a specific part of the project. Each use case branch will be named after the use case code and the general branch will be named development.


### Setup the project

For this project you will need to install NodeJS version 10.

After installing these please you can follow these simple steps:

1. Clone this repository into your local machine.

```bash
$ git clone git@github.com:ProyectoIntegrador2018/tenderos_web.git
```

2. Create a .evn file and add the firebase credentials as follows:
REACT_APP_API_KEY="XXXXXXXXXXX"
REACT_APP_AUTH_DOMAIN=XXXXXXXXXXX
REACT_APP_DATABASE_URL=XXXXXXXXXXX
REACT_APP_PROJECT_ID=XXXXXXXXXXX
REACT_APP_STORAGE_BUCKET=XXXXXXXXXXX
REACT_APP_MESSAGING_SENDER_ID=XXXXXXXXXXX
REACT_APP_APP_ID="XXXXXXXXXXX"
REACT_APP_MEASUREMENT_ID=XXXXXXXXXXX

You now have your setup ready to open and run the project.


### Running the stack for Development

1. Run "npm install" on the terminal, to install all node modules

2. Run "npm run local" to run the project in localhost:3000


### Stop the project

To stop the project it is needed to kill the terminal process.
19 changes: 19 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
runtime: nodejs10
service: react-dashboard
# service: preprod-react-dashboard

# [START handlers]
handlers:
# All files that can be compiled in angular. Luckily, they all have suffixes.
- url: /(.*\.(css|eot|gz|html|ico|js|map|png|svg|ttf|woff|woff2))
static_files: build/\1
upload: build/(.*\.(css|eot|gz|html|ico|js|map|png|svg|ttf|woff|woff2))

- url: /(.*)
static_files: build/index.html
upload: build/index.html

#- url: /(.*)
# static_files: build
# upload: build/(.*)
# [END handlers]
3 changes: 3 additions & 0 deletions dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dispatch:
- url: ""
service: react-dashboard
62 changes: 62 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "dashboard-web",
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-regular-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/react-fontawesome": "^0.1.9",
"@material-ui/core": "^4.10.0",
"@material-ui/icons": "^4.9.1",
"@nivo/bar": "^0.61.1",
"axios": "^0.19.2",
"bootstrap": "^4.5.0",
"cors": "^2.8.5",
"dotenv": "^8.1.0",
"firebase": "^7.14.4",
"firebase-admin": "^8.12.1",
"firebase-functions": "^3.2.0",
"http2": "^3.3.7",
"jquery": "^3.5.1",
"jsonwebtoken": "^8.5.1",
"lockr": "^0.8.5",
"mdbreact": "^4.26.1",
"multiselect-react-dropdown": "^1.5.0",
"querystring": "^0.2.0",
"react": "^16.13.1",
"react-bootstrap": "^0.32.4",
"react-chartjs-2": "^2.9.0",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-responsive-sidebar": "^0.1.16",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.1",
"reactstrap": "^8.4.1",
"request": "^2.88.2",
"typescript": "^3.9.2"
},
"scripts": {
"start": "serve -s build",
"local": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {}
}
Binary file added public/assets/Chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/LineChart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/TimeChart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions public/assets/userIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
56 changes: 56 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Dashboard" />
<link rel="apple-touch-icon" href="logo192.png" />

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<link href="/plugins/css/style.css" rel="stylesheet">

<!-- Custom CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css">
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="/plugins/css/sb-admin-2.css" rel="stylesheet">
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">


<title>Dashboard</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->

<!-- jQuery -->
<script src="/plugins/jquery/jquery.js"></script>
<script src="/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/plugins/jquery-easing/jquery.easing.min.js"></script>

<!-- DataTables JavaScript -->
<script src="/plugins/js/main.js"></script>
<script src="/plugins/datatables/js/jquery.dataTables.min.js"></script>
<!-- <script src="./plugins/datatables/js/dataTables.bootstrap4.js"></script> -->

<!-- Custom Theme JavaScript -->
<script src="/plugins/js/sb-admin-2.js"></script>
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>

</body>

</html>
Binary file added public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "Dashboard",
"name": "Dashboard web",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Loading

0 comments on commit d81fa18

Please sign in to comment.