Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions src/components/CustomAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import {
Link,
Button
} from '@mui/material'
import { FaArrowLeft, FaCheckCircle, FaEdit, FaPlusCircle } from 'react-icons/fa'
import { FaArrowLeft, FaCheckCircle, FaCross, FaEdit, FaPlusCircle, FaTimesCircle } from 'react-icons/fa'
import { useLocation, useNavigate } from 'react-router-dom';
import { useMyContext } from '../context/Context';
import { FiChevronLeft } from '@react-icons/all-files/fi/FiChevronLeft';
export function CustomAppBar(props: any) {
const location = useLocation();
const sharedData = useMyContext();
Expand All @@ -17,9 +18,9 @@ export function CustomAppBar(props: any) {
const Module = module.toLowerCase()
return (
<AppBar sx={{
backgroundColor: '#1A3353', height: '44px', justifyContent: 'center', marginTop: '-3px', boxShadow: 'none',
backgroundColor: '#1A3353', height: '50px', justifyContent: 'center', marginTop: '-3px', boxShadow: 'none',
// position: 'fixed',
top: '64px',
top: '64px',
left: sharedData === 200 ? '200px' : '60px',
width: '-webkit-fill-available'
}}
Expand All @@ -31,30 +32,30 @@ export function CustomAppBar(props: any) {
sx={{ '.MuiBreadcrumbs-separator': { color: 'white' } }}
// className={classes.breadcrumbs}
>
<Link underline='hover' color='lightgray' fontSize='16px' href='/'>
<Link underline='hover' color='lightgray' fontSize='15px' href='/' sx={{ ml: '15px', fontWeight: 600 }}>
Dashboard
</Link>
<Link
underline='hover'
color='lightgray'
fontSize='16px'
fontSize='15px'
onClick={() => navigate(`/app/${Module}`)}
style={{ cursor: 'pointer' }}
sx={{ cursor: 'pointer', fontWeight: 600 }}
>
{module}
</Link>
<Link style={{ color: 'white' }} underline='none' fontSize='16px'>{crntPage}</Link>
<Link style={{ color: 'white', fontWeight: 600 }} underline='none' fontSize='15px'>{crntPage}</Link>
</Breadcrumbs>
</div>
{location.state?.detail ?
<div className='saveClose'>

<div style={{ marginRight: '5px' }}>
<div style={{ marginRight: '10px' }}>
<Button
size='small'
className='header-button'
onClick={backbtnHandle}
startIcon={<FaArrowLeft style={{ fill: '#1A3353', width: '10px', marginTop: '-1px', marginLeft: '2px' }} />}
style={{ textTransform: 'none', fontSize: '16px', backgroundColor: 'whitesmoke', color: '#5B5C63', height: '32px', minHeight: '32px', paddingBottom: '3px' }}
startIcon={<FiChevronLeft style={{ fontSize: '20px', marginRight: '-2px' }} />}
style={{ backgroundColor: 'white', color: '#5B5C63' }}
>
{backBtn}
</Button>
Expand All @@ -63,9 +64,10 @@ export function CustomAppBar(props: any) {
<Button
type='submit'
variant='contained'
className='header-button'
size='small'
onClick={editHandle}
startIcon={<FaEdit style={{ fill: 'white', width: '16px', marginTop: '-1px', marginLeft: '2px' }} />}
startIcon={<FaEdit style={{ fill: 'white', width: '16px' }} />}
style={{ textTransform: 'capitalize', fontWeight: 'bold', fontSize: '16px' }}
>
Edit
Expand All @@ -74,36 +76,38 @@ export function CustomAppBar(props: any) {

</div> :
<div className='saveClose'>
<div style={{ marginRight: '5px' }}>
<div style={{ marginRight: '10px' }}>
<Button
className='header-button'
size='small'
onClick={backbtnHandle}
startIcon={<FaArrowLeft color='primary' style={{ width: '10px', marginTop: '-1px', marginLeft: '2px' }} />}
style={{ textTransform: 'none', fontSize: '16px', backgroundColor: 'whitesmoke', color: '#5B5C63', height: '32px', minHeight: '32px', paddingBottom: '3px' }}
startIcon={<FiChevronLeft style={{ fontSize: '20px', marginRight: '-2px' }} />}
style={{ backgroundColor: 'white', color: '#5B5C63' }}
>
{backBtn}
</Button>
</div>
<div style={{ marginRight: '5px' }}>
<div style={{ marginRight: '10px' }}>
<Button
// onClick={backbtnHandle}
className='header-button'
onClick={onCancel}
size='small'
variant='contained'
startIcon={<FaPlusCircle style={{ fill: 'white', width: '16px', marginLeft: '2px' }} />}
style={{ textTransform: 'none', fontWeight: 'bold', fontSize: '16px' }}
startIcon={<FaTimesCircle style={{ fill: 'white', width: '16px', marginLeft: '2px' }} />}
sx={{ backgroundColor: '#2b5075', ':hover': { backgroundColor: '#1e3750' } }}
>
Cancel
</Button>
</div>
<div>
<Button
// type='submit'
className='header-button'
onClick={onSubmit}
variant='contained'
size='small'
startIcon={<FaCheckCircle style={{ fill: 'white', width: '16px', marginLeft: '2px' }} />}
style={{ textTransform: 'none', fontWeight: 'bold', fontSize: '16px' }}
>
Save
</Button>
Expand Down
10 changes: 7 additions & 3 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Cases from '../pages/cases/Cases';
import logo from '../assets/images/auth/img_logo.png';
import { AddLeads } from '../pages/leads/AddLeads';
import Accounts from '../pages/accounts/Accounts';
import { AddAccount } from '../pages/accounts/AddAccounts';
import { AddAccount } from '../pages/accounts/AddAccount';
import { AccountDetails } from '../pages/accounts/AccountDetails';
import { AddUsers } from '../pages/users/AddUsers';
import { AddOpportunity } from '../pages/opportunities/AddOpportunity';
Expand All @@ -36,6 +36,8 @@ import CompanyDetails from '../pages/company/CompanyDetails';
import EditCompany from '../pages/company/EditCompany';
import { EditLead } from '../pages/leads/EditLead';
import UserDetails from '../pages/users/UserDetails';
import { EditAccount } from '../pages/accounts/EditAccount';
import { EditOpportunity } from '../pages/opportunities/EditOpportunity';


// declare global {
Expand Down Expand Up @@ -172,7 +174,7 @@ export default function Sidebar(props: any) {
<IconButton sx={{ ml: '-10px' }} onClick={() => setDrawerWidth(drawerWidth === 60 ? 200 : 60)}>
<FaBars style={{ height: '20px' }} />
</IconButton>
<Typography sx={{ fontWeight: 'bold', color: 'black', ml: '20px', textTransform: 'capitalize' }}>
<Typography sx={{ fontWeight: 'bold', color: 'black', ml: '20px', textTransform: 'capitalize',fontSize:'20px',mt:'5px' }}>
{screen}
{/* Bottle-CRM */}
</Typography>
Expand Down Expand Up @@ -297,13 +299,15 @@ export default function Sidebar(props: any) {
<Route path='/app/accounts' element={<Accounts />} />
<Route path='/app/accounts/add-account' element={<AddAccount />} />
<Route path='/app/accounts/account-details' element={<AccountDetails />} />
<Route path='/app/accounts/edit-account' element={<EditAccount />} />
<Route path='/app/users' element={<Users />} />
<Route path='/app/users/add-users' element={<AddUsers />} />
<Route path='/app/users/edit-user' element={<EditUser />} />
<Route path='/app/users/user-details' element={<UserDetails />} />
<Route path='/app/opportunities' element={<Opportunities />} />
<Route path='/app/opportunities/add-opportunities' element={<AddOpportunity />} />
<Route path='/app/opportunities/add-opportunity' element={<AddOpportunity />} />
<Route path='/app/opportunities/opportunity-details' element={<OpportunityDetails />} />
<Route path='/app/opportunities/edit-opportunity' element={<EditOpportunity />} />
<Route path='/app/cases' element={<Cases />} />
<Route path='/app/add-cases' element={<AddCases />} />
</Routes>
Expand Down
54 changes: 27 additions & 27 deletions src/components/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,71 @@ import React, { useEffect, useState } from 'react'
import { Chip } from '@mui/material'

export const Tags = (props:any) => {
// const [tags, seTags] = useState([props.tags.name])
// const [tags, seTags] = useState([props.tags])
const [tagsColor, setTagsColor] = useState('#665d1e')

useEffect(() => {
colorTag()
}, [])

const colorTag = () => {
if (props.tags.name === 'account') {
if (props.tags === 'account') {
setTagsColor('red')
} else if (props.tags.name === 'testing') {
} else if (props.tags === 'testing') {
setTagsColor('#D22B2B')
} else if (props.tags.name === 'assigned') {
} else if (props.tags === 'assigned') {
setTagsColor('#0087bd')
} else if (props.tags.name === 'bug') {
} else if (props.tags === 'bug') {
setTagsColor('#008000')
} else if (props.tags.name === 'closed') {
} else if (props.tags === 'closed') {
setTagsColor('#008080')
} else if (props.tags.name === 'asdfg') {
} else if (props.tags === 'asdfg') {
setTagsColor('Crimson')
} else if (props.tags.name === 'test') {
} else if (props.tags === 'test') {
setTagsColor('#b06500')
} else if (props.tags.name === 'new') {
} else if (props.tags === 'new') {
setTagsColor('#FF2400')
} else if (props.tags.name === 'tagtest') {
} else if (props.tags === 'tagtest') {
setTagsColor('#ffff00')
} else if (props.tags.name === 'assigning') {
} else if (props.tags === 'assigning') {
setTagsColor('#E0115F')
} else if (props.tags.name === 'leading') {
} else if (props.tags === 'leading') {
setTagsColor('#4e1609')
} else if (props.tags.name === 'processing') {
} else if (props.tags === 'processing') {
setTagsColor('#ffa500')
} else if (props.tags.name === 'vddafv') {
} else if (props.tags === 'vddafv') {
setTagsColor('#ff004f')
} else if (props.tags.name === 'vfvfavtq') {
} else if (props.tags === 'vfvfavtq') {
setTagsColor('#ff5a36')
} else if (props.tags.name === 'active') {
} else if (props.tags === 'active') {
setTagsColor('#7f1734')
} else if (props.tags.name === 'details') {
} else if (props.tags === 'details') {
setTagsColor('#FF2400')
} else if (props.tags.name === 'testing') {
} else if (props.tags === 'testing') {
setTagsColor('#D22B2B')
} else if (props.tags.name === 'created') {
} else if (props.tags === 'created') {
setTagsColor('#880808')
} else if (props.tags.name === 'details') {
} else if (props.tags === 'details') {
setTagsColor('#66ff00')
} else if (props.tags.name === 'new') {
} else if (props.tags === 'new') {
setTagsColor('#191970')
} else if (props.tags.name === 'staging') {
} else if (props.tags === 'staging') {
setTagsColor('#191970')
} else if (props.tags.name === 'exist') {
} else if (props.tags === 'exist') {
setTagsColor('#191970')
} else if (props.tags.name === 'tagest') {
} else if (props.tags === 'tagest') {
setTagsColor('#954535')
} else if (props.tags.name === 'asdfg') {
} else if (props.tags === 'asdfg') {
setTagsColor('#E97451')
}
}

return (
<div>
{
props.tags && props.tags.name
props.tags && props.tags
? <Chip
label={props.tags.name}
label={props.tags}
style={{
backgroundColor: tagsColor,
borderRadius: '5px',
Expand Down
Loading