diff --git a/README.md b/README.md index 0c0dfb5..203bd9a 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,10 @@ # CRM Setup : Here we have `two` modules . -- CRM Customer Module (For bank's customer) - CRM Internal Module (For bank's internal team) - -## 1. CRM Customer Module (For External Use) -### Files -`env.local` - -Create a `env.local` file in the root of folder of this project. - -Content of the `env.local` must be as follows: - -``` -SESSION_COOKIE_NAME=crm_auth -SESSION_COOKIE_PASSWORD=abcdefghijklmnopqrstuvwxyz01234567890 - -DB_HOST=localhost -DB_PORT=5432 -DB_NAME=crm -DB_USER_NAME= -DB_USER_PASS -#Mantis -MantisBT_Token= -#CBS -ONLINE_CBS_IP= -ONLINE_CBS_PORT= - -#MESSAGE -WEBSERVER_IP= -WEBSERVER_PORT= -``` -### Requirement : - -- Node JS (Latest) -- PostgreSQL (Latest) - -### Deploy : -- Install all node module - ``` - npm install - ``` -- In the PostgreSQL create one database, the database name will be "crm" -- Build the application - ``` - npm run build - ``` -- Start the application - ``` - npm run start - ``` -- Open the following URL in the web browser for populate some data - - ``` - http://localhost:3000/api/dev/populate - ``` - -### Application Url : -``` -http://localhost:3000/login -``` +- CRM Customer Module (For bank's customer) - -## 2. CRM Internal Module (Ticket Management System) +## 1. CRM Internal Module (Ticket Management System) Here we are using "mantisBT" (open source application) for ticket management system . ### Requirement : @@ -115,11 +57,83 @@ Here we are using "mantisBT" (open source application) for ticket management sys - password : root ### Setup: -- create a new user "kccb". - - Log in to this user `kccb`. - - Go to "My account". - - Then create a API token. - - Copy the API token. - - And paste the token in `.env.local` file in place of `MantisBT_Token` -- create development team's user as protected. -- create a project, and keep the name as "KCCB". \ No newline at end of file +- Go to database `kccb_ticket_tracker` and search for a table `kccb_config`. +- Import `csv\kccb_config.csv` (Present in the CRM internal module) file to the `kccb_config` table. +- Then login as `Administrator` . + - Create new project + ``` + Project Name :KCCB + Description : The kangra Central Co Operative Bank + + Note: Keep other filed as default + ``` + + - Create a new user "kccb". + - Log in to this user `kccb`. + - Go to `My account` (Top right corner) . + - Then create a `API token`. + - Copy the API token. + - And paste the token in `.env.local` file of `CRM Customer Module` in place of `MantisBT_Token`. + > Note : For setup CRM internal module ,We need to create one user `kccb` and create the token for the user. That token will be used in CRM external module . + - Create Backend team as per requirement and enable protected option. + + +## 2. CRM Customer Module (For External Use) +### Files +`env.local` + +Create a `env.local` file in the root of folder of this project. + +Content of the `env.local` must be as follows: + +``` +SESSION_COOKIE_NAME=crm_auth +SESSION_COOKIE_PASSWORD=abcdefghijklmnopqrstuvwxyz01234567890 + +DB_HOST=localhost +DB_PORT=5432 +DB_NAME=crm +DB_USER_NAME= +DB_USER_PASS= + +#Mantis +MantisBT_Token= + +#CBS +ONLINE_CBS_IP= +ONLINE_CBS_PORT= + +#MESSAGE +WEBSERVER_IP= +WEBSERVER_PORT= +``` +### Requirement : + +- Node JS (Latest) +- PostgreSQL (Latest) + +### Deploy : +- Install all node module + ``` + npm install + ``` +- In the PostgreSQL create one database, the database name will be "crm" +- Build the application + ``` + npm run build + ``` +- Start the application + ``` + npm run start + ``` +- Open the following URL in the web browser for populate some data + + ``` + http://localhost:3000/api/dev/populate + ``` + +### Application Url : +``` +http://localhost:3000/login +``` + diff --git a/src/app/api/ticket/route.ts b/src/app/api/ticket/route.ts index 0df35db..d778578 100644 --- a/src/app/api/ticket/route.ts +++ b/src/app/api/ticket/route.ts @@ -23,7 +23,7 @@ export async function POST(request: Request) { const mantisBT_Token =process.env.MantisBT_Token || ""; //MantisBT Token - console.log(mantisBT_Token); + const body = await request.json(); //request_category, nature_of_request, issue, message const { summary, description, additional_information, steps_to_reproduce } = body;