Files

142 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2023-11-16 15:42:36 +01:00
# This project is a toy project for training and quality assurance purposes
2022-11-26 01:23:44 -05:00
# Web App
Boilerplate Webpack 5, React and Bootstrap 5 project with global Css and Css modules enabled.
# Hosts File Config
2024-01-28 14:44:14 +01:00
2023-11-17 14:36:57 +01:00
In order to run this application in local, you'll need to modify your hosts file configuration. Then you will be able to access/serve your application at https://test.manaknightdev.com:3000
2022-11-26 01:23:44 -05:00
### Windows
2024-01-28 14:44:14 +01:00
2022-11-26 01:23:44 -05:00
Please include the following line in your hosts file
2023-11-17 14:36:57 +01:00
`127.0.0.1 test.manaknightdev.com`
2022-11-26 01:23:44 -05:00
2023-04-18 18:40:40 +00:00
See How to edit your hosts file on Windows [here](https://www.groovypost.com/howto/edit-hosts-file-windows-10/)
2022-11-26 01:23:44 -05:00
### Mac
2024-01-28 14:44:14 +01:00
2022-11-26 01:23:44 -05:00
Please do the following steps
`sudo nano /private/etc/hosts`
2023-11-17 14:36:57 +01:00
add `127.0.0.1 test.manaknightdev.com` to the end of the file and save
2022-11-26 01:23:44 -05:00
run `sudo dscacheutil -flushcache` to flush the DNS cache
you might need to run `chmod +x .husky/pre-commit` to have the linter activated on commits
# App Setup
This project is setup to use yarn.
to get started.
2023-02-07 17:09:10 +00:00
`run yarn`
2022-11-26 01:23:44 -05:00
2023-02-07 17:09:10 +00:00
This will install the nodule modules
2022-11-26 01:23:44 -05:00
# Dev Build
`yarn run start`
2023-04-18 18:40:40 +00:00
The Webpack build has a lot of outputs, if this is not intterupted then allow it to completely build for the first time... consecutive builds on "save" are faster after the first build.
In the event you run into any error with the build failing
2023-04-18 18:42:21 +00:00
for this project you can downgrade your `node version to 14 or 16`
2023-04-18 18:40:40 +00:00
2022-11-26 01:23:44 -05:00
# Staging Build
`yarn run staging`
# Production Build
`yarn run production`
# Task
2023-11-17 14:36:57 +01:00
- To login go to https://test.manaknightdev.com:3000/
2024-01-28 14:44:14 +01:00
2023-11-17 14:39:19 +01:00
- devtest@manaknightdev.com / Abcdef123
2024-01-28 14:44:14 +01:00
2023-11-17 14:36:57 +01:00
- Create the form page https://test.manaknightdev.com:3000/form as in screenshot_1
2024-01-28 14:44:14 +01:00
- Need to integrate API to load the table <a href="#get_form">go to doc</a>
- When we click on add button, it will open modal popup showing form. need to integrate the ADD FORM api <a href="#add_form">go to doc</a>
- When we click on a form on the list, it will open modal popup showing form with saved details of the form. need to integrate the EDIT FORM api <a href="#edit_form">go to doc</a>
- Create delete modal and it can delete the form as well screenshot_2 <a href="#delete_form">go to doc</a>
## Important Detail
The popup modal that shows the form has two sections, the left panel and the right panel.
- **The Left Panel**: this is a list of template strings starting with three tilds and ending with three tilds => `~~~name~~~`
when a template is clicked, it is added to the right panel which is a `<textarea></textarea>` as you see in screenshot_3.
- **The Right Panel**: this is a `<textarea></textarea>` where you can type in any text of your choice and also add templates by clicking on a template on the left panel as you see in screenshot_3.
<div id="get_form">
2022-11-26 01:23:44 -05:00
## API for getting Contract Forms
2024-01-28 14:44:14 +01:00
2022-11-26 01:23:44 -05:00
```
GET `/companies/${companyId}/contract-forms`
```
2024-01-28 14:44:14 +01:00
</div>
<div id="add_form">
2022-11-26 01:23:44 -05:00
## API for Adding Contract Forms
2024-01-28 14:44:14 +01:00
2022-11-26 01:23:44 -05:00
```
Request Body: {
company_id: companyId,
name: formName,
replacement_tags: typeof String,
status: 'active',
template: typeof string,
has_signature: true || false,
}
```
```
POST `/contract-forms`
```
2024-01-28 14:44:14 +01:00
</div>
<div id="edit_form">
## API for Editing Contract Forms
```
Request Body: {
company_id: companyId,
name: formName,
replacement_tags: typeof String,
status: 'active',
template: typeof string,
has_signature: true || false,
}
```
```
PUT `/contract-forms`
```
</div>
<div id="delete_form">
2022-11-26 01:23:44 -05:00
```
DELETE `/contract-forms/${contractId}`
2024-01-28 14:44:14 +01:00
```
</div>