-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from ITPNYU/revert-505-main
Revert "Prod Release 11.21"
- Loading branch information
Showing
15 changed files
with
96 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,54 @@ | ||
# Booking App | ||
# 370J Media Commons Room Reservation App | ||
|
||
This project is a booking management application built with Next.js. | ||
## About | ||
|
||
## Getting Started | ||
This application is designed for reserving rooms at the 370J Media Commons Room. | ||
|
||
Follow these steps to run the application in your local environment. | ||
## Technologies Used | ||
|
||
### Prerequisites | ||
- **Google App Script**: For backend scripting and integration. | ||
- **React & Google App Script**: Utilizing [React-Google-Apps-Script](https://github.com/enuchi/React-Google-Apps-Script) for a responsive front-end experience. | ||
- **clasp**: For Google Apps Script project management and deployment. | ||
|
||
- Node.js (version 18 or later) | ||
- npm (usually comes with Node.js) | ||
## Deployment | ||
|
||
### Installation | ||
We employ GitHub workflows for our deployment process. Pushing or merging to different branches will automatically trigger different Google App Script deploys: | ||
- `main` branch: triggers the DEVELOPMENT deploy, which serves from localhost and reads/writes the development calendars | ||
- `staging` branch: triggers the STAGING deploy, which serves from the GAS project and reads/writes the development calendars | ||
- `prod` branch: triggers the PRODUCTION deploy, which serves from the GAS project and reads/writes the **production** calendars | ||
|
||
1. Clone the repository or download the project files. | ||
The `NODE_ENV` environment variable controls where we serve from, and the `CALENDAR_ENV` environment variable controls which calendars we use. These values are specified in the `package.json` commands triggered by the workflows | ||
|
||
2. Navigate to the project directory: | ||
``` | ||
cd booking-app | ||
``` | ||
3. Install the dependencies: | ||
`npm install` | ||
4. Obtain the `.env` file from a project administrator and place it in the root directory of the project. | ||
## Preparation | ||
|
||
### Running the Application | ||
Before setting up the project, ensure you have the following: | ||
|
||
To start the development server: | ||
`npm run dev` | ||
The application should now be running on [http://localhost:3000](http://localhost:3000). | ||
- `.clasprc.json` file from another developer. | ||
- `deploymentId` for Google Apps Script. | ||
|
||
## Environment Variables | ||
## Setup Instructions | ||
|
||
This project uses environment variables for configuration. Make sure you have received the `.env` file from a project administrator and placed it in the root directory before running the application. | ||
When developing locally, please follow the flow below. | ||
|
||
## Deployment | ||
1. **Clone the Repository**: | ||
2. **Configure `.clasprc.json`**: | ||
Set up the `.clasprc.json` file with the necessary credentials. | ||
3. **Install Packages**: | ||
```bash | ||
npm install | ||
``` | ||
4. **Upload Local Code to Google App Script**: | ||
|
||
This project uses automated deployment pipelines: | ||
```bash | ||
npm run start | ||
``` | ||
|
||
- Pushing to the `main` branch automatically deploys to the development environment. | ||
- Pushing to the `staging` branch automatically deploys to the staging environment. | ||
- Pushing to the `production` branch automatically deploys to the production environment. | ||
Please continue running this and execute the following command. | ||
|
||
Please ensure you push your changes to the appropriate branch based on the intended deployment environment. | ||
5. **Create a New Version of Google App Script**: | ||
Deploy using clasp, targeting your `deploymentId`: | ||
```bash | ||
clasp deploy --deploymentId ${deploymentID} -d DEV_YOURNAME | ||
``` | ||
6. **Access the Application**: | ||
You can now access the app at `https://script.google.com/a/macros/nyu.edu/s/${deploymentId}/exec`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
booking-app/components/src/client/routes/admin/components/PolicySettings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { Box } from "@mui/material"; | ||
import FinalApprover from "./policySettings/FinalApprover"; | ||
import OperationalHours from "./policySettings/OperationalHours"; | ||
import React from "react"; | ||
|
||
export default function PolicySettings() { | ||
return ( | ||
<Box> | ||
<FinalApprover /> | ||
<OperationalHours /> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 0 additions & 103 deletions
103
...ing-app/components/src/client/routes/admin/components/policySettings/OperationalHours.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.