Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8886544024 | |||
| cadd2aa4c4 | |||
| 104cd15f64 | |||
| 3acdbfb6e0 | |||
| f30600816b | |||
| 627774c910 | |||
| ee59990d85 | |||
| 7f4d8f3ff0 | |||
| b888e9f5df |
@@ -0,0 +1,30 @@
|
|||||||
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
|
||||||
|
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||||
|
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||||
|
|
||||||
|
REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
|
||||||
|
#REACT_APP_APPSITE="http://localhost:7012"
|
||||||
|
|
||||||
|
|
||||||
|
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
|
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
|
REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
|
||||||
|
REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
|
||||||
|
|
||||||
|
#REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
|
#REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
|
|
||||||
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
|
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
||||||
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
|
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||||
|
REACT_APP_SIGNUP_ERROR_TIMEOUT=7000
|
||||||
|
|
||||||
|
# Had to change the error time to 3sec cause it took too long
|
||||||
|
REACT_APP_RESET_START_ERROR_TIMEOUT=3000
|
||||||
|
|
||||||
|
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
|
||||||
|
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
|
||||||
|
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||||
|
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||||
|
|
||||||
|
REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
|
||||||
|
#REACT_APP_APPSITE="http://localhost:7012"
|
||||||
|
|
||||||
|
|
||||||
|
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
|
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
|
REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
|
||||||
|
REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
|
||||||
|
|
||||||
|
#REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
|
#REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
|
|
||||||
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
|
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
||||||
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
|
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||||
|
REACT_APP_SIGNUP_ERROR_TIMEOUT=7000
|
||||||
|
|
||||||
|
# Had to change the error time to 3sec cause it took too long
|
||||||
|
REACT_APP_RESET_START_ERROR_TIMEOUT=3000
|
||||||
|
|
||||||
|
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||||
|
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
# pull the base image
|
||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
# Build args
|
||||||
|
ARG NODE_ENV
|
||||||
|
|
||||||
|
# set the working direction
|
||||||
|
#WORKDIR /app
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# add `/app/node_modules/.bin` to $PATH
|
||||||
|
# ENV PATH /app/node_modules/.bin:$PATH
|
||||||
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||||
|
ENV NODE_ENV=$NODE_ENV
|
||||||
|
|
||||||
|
# install nginx
|
||||||
|
RUN apk update
|
||||||
|
RUN apk add nginx
|
||||||
|
|
||||||
|
# install app dependencies
|
||||||
|
COPY package.json ./
|
||||||
|
|
||||||
|
COPY package-lock.json ./
|
||||||
|
|
||||||
|
COPY nginx.conf ./
|
||||||
|
|
||||||
|
COPY run.sh ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# add app
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
|
# start app
|
||||||
|
CMD /bin/sh ./run.sh
|
||||||
|
|
||||||
+5
-3
@@ -4,7 +4,9 @@ services:
|
|||||||
image: registry.chiefsoft.net/wrenchboard-users-wrench:latest
|
image: registry.chiefsoft.net/wrenchboard-users-wrench:latest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- NODE_ENV=production
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 9082:3000
|
- 9082:3000
|
||||||
@@ -13,19 +15,19 @@ services:
|
|||||||
working_dir: /usr/src/app
|
working_dir: /usr/src/app
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/usr/src/app
|
- ./:/usr/src/app
|
||||||
- /usr/src/app/node_modules
|
|
||||||
- ./src/:/usr/src/app/src
|
- ./src/:/usr/src/app/src
|
||||||
- ./vendors/:/usr/src/app/vendors
|
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- backend.wrenchboard.api.live:10.10.33.15
|
- backend.wrenchboard.api.live:10.10.33.15
|
||||||
- backend.wrenchboard.api.test:10.10.33.15
|
- backend.wrenchboard.api.test:10.10.33.15
|
||||||
- apigate.lotus.g1.wrenchboard.com:10.10.33.15
|
- apigate.lotus.g1.wrenchboard.com:10.10.33.15
|
||||||
|
- apigate.orion.g1.wrenchboard.com:10.10.33.15
|
||||||
# #- backend.wrenchboard.api.live:172.31.4.27
|
# #- backend.wrenchboard.api.live:172.31.4.27
|
||||||
# #- backend.wrenchboard.api.test:10.20.30.27
|
# #- backend.wrenchboard.api.test:10.20.30.27
|
||||||
- apigateway.wrenchboard.app.dev.fluxtra.net:10.20.30.19
|
- apigateway.wrenchboard.app.dev.fluxtra.net:10.20.30.19
|
||||||
- apigateway.wrenchboard.app.lotus.fluxtra.net:172.31.4.19
|
- apigateway.wrenchboard.app.lotus.fluxtra.net:172.31.4.19
|
||||||
environment:
|
environment:
|
||||||
- CHOKIDAR_USEPOLLING=true
|
- CHOKIDAR_USEPOLLING=true
|
||||||
|
- NODE_ENV=${NODE_ENV:-production}
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./:/app
|
# - ./:/app
|
||||||
# - /app/node_modules
|
# - /app/node_modules
|
||||||
|
|||||||
+15
-1
@@ -3,7 +3,15 @@
|
|||||||
|
|
||||||
FROM alpine:3.15
|
FROM alpine:3.15
|
||||||
|
|
||||||
|
# Build args
|
||||||
|
ARG NODE_ENV
|
||||||
|
|
||||||
ENV NODE_VERSION 14.19.0
|
ENV NODE_VERSION 14.19.0
|
||||||
|
ENV NODE_ENV=$NODE_ENV
|
||||||
|
|
||||||
|
# install nginx
|
||||||
|
RUN apk update
|
||||||
|
RUN apk add nginx
|
||||||
|
|
||||||
RUN addgroup -g 1000 node \
|
RUN addgroup -g 1000 node \
|
||||||
&& adduser -u 1000 -G node -s /bin/sh -D node \
|
&& adduser -u 1000 -G node -s /bin/sh -D node \
|
||||||
@@ -103,6 +111,10 @@ WORKDIR /usr/src/app
|
|||||||
# ENV PATH /app/node_modules/.bin:$PATH
|
# ENV PATH /app/node_modules/.bin:$PATH
|
||||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
|
COPY nginx.conf ./
|
||||||
|
|
||||||
|
COPY run.sh ./
|
||||||
|
|
||||||
# install app dependencies
|
# install app dependencies
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
@@ -114,7 +126,9 @@ RUN npm install
|
|||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
# start app
|
# start app
|
||||||
CMD ["npm","run", "start"]
|
# CMD ["npm","run", "start"]
|
||||||
|
|
||||||
# CMD ["yarn", "start"]
|
# CMD ["yarn", "start"]
|
||||||
|
|
||||||
|
# start app
|
||||||
|
CMD /bin/sh ./run.sh
|
||||||
|
|||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
server {
|
||||||
|
gzip on;
|
||||||
|
listen 3000;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/src/app/build;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
|
location /nginx_status {
|
||||||
|
stub_status on;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+2
-2
@@ -30,8 +30,8 @@
|
|||||||
"yup": "^1.1.1"
|
"yup": "^1.1.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start -e .env.development",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build -e .env.production",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"lint": "yarn add -D prettier@2.4.1 && yarn add -D eslint@7.11.0 && yarn add -D babel-eslint@10.1.0 && npx install-peerdeps --dev eslint-config-airbnb@18.2.1 && yarn add -D eslint-config-prettier@8.3.0 eslint-plugin-prettier@4.0.0"
|
"lint": "yarn add -D prettier@2.4.1 && yarn add -D eslint@7.11.0 && yarn add -D babel-eslint@10.1.0 && npx install-peerdeps --dev eslint-config-airbnb@18.2.1 && yarn add -D eslint-config-prettier@8.3.0 eslint-plugin-prettier@4.0.0"
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
export NODE_ENV="${NODE_ENV:-development}"
|
||||||
|
|
||||||
|
if [ $NODE_ENV == "development" ]; then
|
||||||
|
# this runs webpack-dev-server with hot reloading
|
||||||
|
npm start
|
||||||
|
else
|
||||||
|
# build the app and serve it via nginx
|
||||||
|
npm run build
|
||||||
|
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
|
||||||
|
nginx -c /usr/src/app/nginx.conf
|
||||||
|
fi
|
||||||
@@ -18,6 +18,7 @@ export default function Hero({ className }) {
|
|||||||
infinite: true,
|
infinite: true,
|
||||||
swipe: true,
|
swipe: true,
|
||||||
};
|
};
|
||||||
|
const sildeData =null;
|
||||||
const [addFavorite, setValue] = useState(false);
|
const [addFavorite, setValue] = useState(false);
|
||||||
const favoriteHandler = () => {
|
const favoriteHandler = () => {
|
||||||
if (!addFavorite) {
|
if (!addFavorite) {
|
||||||
@@ -96,7 +97,7 @@ export default function Hero({ className }) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<HomeSliders settings={settings} />
|
<HomeSliders settings={settings} sideData={sildeData}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ export default function HomeSliders(props) {
|
|||||||
<div className="item w-full h-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
|
<div className="item w-full h-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
|
||||||
<img src={slider3} alt="slider" className="w-full h-full" />
|
<img src={slider3} alt="slider" className="w-full h-full" />
|
||||||
</div>
|
</div>
|
||||||
|
<div className="item w-full h-full bg-red dark:bg-dark-white rounded-2xl overflow-hidden">
|
||||||
|
Olusesan Ameye Data
|
||||||
|
</div>
|
||||||
</SliderCom>
|
</SliderCom>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,26 @@
|
|||||||
import React, {useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import Icons from '../Helpers/Icons'
|
import Icons from '../Helpers/Icons'
|
||||||
|
import usersService from '../../services/UsersService'
|
||||||
|
|
||||||
function AddRecipient() {
|
function AddRecipient() {
|
||||||
|
|
||||||
|
const apiURL = new usersService()
|
||||||
|
|
||||||
|
let [countries, setCountries] = useState({ // STATE TO HOLD LIST OF COUNTRIES
|
||||||
|
loading: true,
|
||||||
|
data: []
|
||||||
|
})
|
||||||
|
|
||||||
|
let [bankName, setBankName] = useState({ // STATE TO HOLD LIST OF BANK NAME
|
||||||
|
loading: true,
|
||||||
|
data: []
|
||||||
|
})
|
||||||
|
|
||||||
|
let [accountType, setAccountType] = useState({ // STATE TO HOLD LIST ACCOUNT TYPE
|
||||||
|
loading: true,
|
||||||
|
data: []
|
||||||
|
})
|
||||||
|
|
||||||
//STATE FOR CONTROLLED INPUTS
|
//STATE FOR CONTROLLED INPUTS
|
||||||
let [inputs, setInputs] = useState({
|
let [inputs, setInputs] = useState({
|
||||||
@@ -28,11 +46,7 @@ function AddRecipient() {
|
|||||||
|
|
||||||
//valid inputs before submitting. Just for texting remove later
|
//valid inputs before submitting. Just for texting remove later
|
||||||
|
|
||||||
// setInputs((prev)=>{
|
|
||||||
// for(let input in prev){
|
|
||||||
// prev[input] = ''
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// RETURN INPUTS TO EMPTY STRING
|
// RETURN INPUTS TO EMPTY STRING
|
||||||
setInputs({
|
setInputs({
|
||||||
firstname: '',
|
firstname: '',
|
||||||
@@ -46,6 +60,55 @@ function AddRecipient() {
|
|||||||
city: ''
|
city: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET COUNTRIES
|
||||||
|
const getCountry = ()=> {
|
||||||
|
apiURL.getSignupCountryData().then((res)=>{
|
||||||
|
if(res.data.internal_return < 0){
|
||||||
|
setCountries(prev => ({loading: false, data: []}))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setCountries(prev => ({loading: false, data:res.data.signup_country}))
|
||||||
|
}).catch((error)=>{
|
||||||
|
setCountries(prev => ({loading: false, data: []}))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// END OF FUNCTION TO GET COUNTRIES
|
||||||
|
|
||||||
|
// FUNCTION TO GET COUNTRY BANK
|
||||||
|
const getCountryBank = ()=> {
|
||||||
|
apiURL.getCountryBank().then((res)=>{
|
||||||
|
if(res.data.internal_return < 0){
|
||||||
|
setBankName(prev => ({loading: false, data: []}))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setBankName(prev => ({loading: false, data:res.data.result_list}))
|
||||||
|
}).catch((error)=>{
|
||||||
|
setBankName(prev => ({loading: false, data: []}))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// END OF FUNCTION TO GET COUNTRY BANK
|
||||||
|
|
||||||
|
// FUNCTION TO GET ACCOUNT TYPES
|
||||||
|
const getAccountTypes = ()=> {
|
||||||
|
apiURL.getAccountTypes().then((res)=>{
|
||||||
|
if(res.data.internal_return < 0){
|
||||||
|
setAccountType(prev => ({loading: false, data: []}))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setAccountType(prev => ({loading: false, data:res.data.result_list}))
|
||||||
|
}).catch((error)=>{
|
||||||
|
setAccountType(prev => ({loading: false, data: []}))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// END OF FUNCTION TO GET ACCOUNT TYPES
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getCountry() // TO LOAD LIST COUNTRY
|
||||||
|
getCountryBank() // TO LOAD LIST COUNTRY BANK
|
||||||
|
getAccountTypes() // TO LOAD LIST ACCOUNT TYPES
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
|
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
|
||||||
<div className="w-full mb-10 lg:mb-0">
|
<div className="w-full mb-10 lg:mb-0">
|
||||||
@@ -56,7 +119,7 @@ function AddRecipient() {
|
|||||||
{/* inputs starts here */}
|
{/* inputs starts here */}
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>First Name <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>First Name <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs.firstname}
|
value={inputs.firstname}
|
||||||
name='firstname'
|
name='firstname'
|
||||||
type="text"
|
type="text"
|
||||||
@@ -68,7 +131,7 @@ function AddRecipient() {
|
|||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Last Name <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Last Name <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs.lastname}
|
value={inputs.lastname}
|
||||||
name='lastname'
|
name='lastname'
|
||||||
type="text"
|
type="text"
|
||||||
@@ -80,21 +143,45 @@ function AddRecipient() {
|
|||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Country <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Country <span className='text-red-500'>*</span></label>
|
||||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='country' onChange={handleChange}>
|
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='country' onChange={handleChange}>
|
||||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
{countries.loading ?
|
||||||
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
|
:
|
||||||
|
countries.data.length ?
|
||||||
|
<>
|
||||||
|
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||||
|
{countries.data.map((item, index)=>(
|
||||||
|
<option key={index} className='text-slate-500 text-lg' value={item[0]}>{item[1]}</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Bank Name <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Bank Name <span className='text-red-500'>*</span></label>
|
||||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='bank-name' onChange={handleChange}>
|
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='bank-name' onChange={handleChange}>
|
||||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
{bankName.loading ?
|
||||||
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
|
:
|
||||||
|
bankName.data.length ?
|
||||||
|
<>
|
||||||
|
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||||
|
{bankName.data.map((item, index)=>(
|
||||||
|
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account Number <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account Number <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs['account-number']}
|
value={inputs['account-number']}
|
||||||
name='account-number'
|
name='account-number'
|
||||||
type="text"
|
type="text"
|
||||||
@@ -106,7 +193,7 @@ function AddRecipient() {
|
|||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Repeat Account Number <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Repeat Account Number <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs['repeat-account-number']}
|
value={inputs['repeat-account-number']}
|
||||||
name='repeat-account-number'
|
name='repeat-account-number'
|
||||||
type="text"
|
type="text"
|
||||||
@@ -118,14 +205,26 @@ function AddRecipient() {
|
|||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account type <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account type <span className='text-red-500'>*</span></label>
|
||||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='account-type' onChange={handleChange}>
|
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='account-type' onChange={handleChange}>
|
||||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
{accountType.loading ?
|
||||||
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
|
:
|
||||||
|
accountType.data.length ?
|
||||||
|
<>
|
||||||
|
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||||
|
{accountType.data.map((item, index)=>(
|
||||||
|
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>State/Province <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>State/Province <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs.state}
|
value={inputs.state}
|
||||||
name='state'
|
name='state'
|
||||||
type="text"
|
type="text"
|
||||||
@@ -137,7 +236,7 @@ function AddRecipient() {
|
|||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>City <span className='text-red-500'>*</span></label>
|
<label className='w-full md:w-1/4 text-slate-600 text-lg'>City <span className='text-red-500'>*</span></label>
|
||||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||||
value={inputs.city}
|
value={inputs.city}
|
||||||
name='city'
|
name='city'
|
||||||
type="text"
|
type="text"
|
||||||
|
|||||||
@@ -96,6 +96,17 @@ class usersService {
|
|||||||
return this.postAuxEnd("/getjobsdata", postData);
|
return this.postAuxEnd("/getjobsdata", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHeroJBanners(){
|
||||||
|
var postData = {
|
||||||
|
uuid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
page:0,
|
||||||
|
limit :100
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/homebanners", postData);
|
||||||
|
}
|
||||||
|
|
||||||
getMyJobList(){
|
getMyJobList(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
@@ -263,6 +274,29 @@ class usersService {
|
|||||||
return this.postAuxEnd("/signupcountry", null);
|
return this.postAuxEnd("/signupcountry", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// END POINT TO GET BANK NAME
|
||||||
|
getCountryBank() {
|
||||||
|
var postData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
action: 11183,
|
||||||
|
country: 'NG'
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/countrybanks", postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// END POINT TO GET ACCOUNT TYPE
|
||||||
|
getAccountTypes() {
|
||||||
|
var postData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
action: 11177
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/accounttypes", postData);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||||
|
|||||||
+18
-2
@@ -1,7 +1,23 @@
|
|||||||
import React from "react";
|
import React, {useState, useEffect} from 'react'
|
||||||
import Home from "../components/Home";
|
import Home from "../components/Home";
|
||||||
|
import usersService from "../services/UsersService";
|
||||||
export default function HomePages() {
|
export default function HomePages() {
|
||||||
|
|
||||||
|
const [marketActiveJobList, setMarketActiveJobList] = useState([]);
|
||||||
|
const api = new usersService();
|
||||||
|
|
||||||
|
const getMarketActiveJobList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await api.getHeroJBanners();
|
||||||
|
setMarketActiveJobList(res.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("Error getting mode");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
getMarketActiveJobList();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Home />
|
<Home />
|
||||||
|
|||||||
Reference in New Issue
Block a user