Skip to content

Commit e3e6f98

Browse files
authored
Merge pull request #214 from scientist-softserv/176-expand-configuration-options
176 expand configuration options
2 parents ae2477c + b5f366a commit e3e6f98

File tree

12 files changed

+125
-41
lines changed

12 files changed

+125
-41
lines changed

assets/svg/gps-logo-white.svg

Lines changed: 10 additions & 0 deletions
Loading

pages/_app.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Footer, Header } from '@scientist-softserv/webstore-component-library'
22
import { SWRConfig } from 'swr'
33
import {
4-
SessionProvider, signIn, signOut, useSession
4+
SessionProvider,
5+
signIn,
6+
signOut,
7+
useSession,
58
} from 'next-auth/react'
6-
79
import {
810
FOOTER_NAME,
911
FOOTER_SECTIONS,
1012
FOOTER_SOCIALS,
13+
headerAndFooterLinkColors,
1114
LOGO,
1215
NAVIGATION_LINKS,
1316
fetcher,
@@ -24,12 +27,14 @@ const WebStore = ({ Component }) => {
2427
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),
2528
signOut: signOut,
2629
}}
30+
linkColor={headerAndFooterLinkColors}
2731
logo={LOGO}
2832
navLinks={NAVIGATION_LINKS}
2933
userSession={session}
3034
/>
3135
<Component />
3236
<Footer
37+
color={headerAndFooterLinkColors}
3338
companyName={FOOTER_NAME}
3439
sections={FOOTER_SECTIONS}
3540
socials={FOOTER_SOCIALS}

pages/api/auth/[...nextauth].js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ const authOptions = {
2525
}
2626
}
2727
],
28-
theme: {
29-
logo: '/logo.svg', // requires a file in the public folder
30-
},
3128
callbacks: {
3229
async jwt({ token, account, user }) {
3330
// Triggered on the initial sign in

pages/browse/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ import {
77
Notice,
88
SearchBar,
99
} from '@scientist-softserv/webstore-component-library'
10-
import { configureErrors, configureServices, useFilteredWares } from '../../utils'
10+
import {
11+
buttonBg,
12+
configureErrors,
13+
configureServices,
14+
useFilteredWares,
15+
} from '../../utils'
1116

1217
const Browse = () => {
1318
const router = useRouter()
@@ -60,7 +65,7 @@ const Browse = () => {
6065
buttonLink={service.href}
6166
orientation='horizontal'
6267
buttonProps={{
63-
backgroundColor: '#A9A9A9',
68+
backgroundColor: buttonBg,
6469
label: 'Request this item',
6570
}}
6671
/>

pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
configureServices,
1515
useAllWares,
1616
FEATURED_SERVICE_PATH,
17-
TEXT,
17+
ABOUT_US,
1818
TITLE,
1919
} from '../utils'
2020

@@ -43,7 +43,7 @@ const Home = () => {
4343
/>
4444
<div className='container'>
4545
<SearchBar onSubmit={handleOnSubmit} />
46-
<TitledTextBox title={TITLE} text={TEXT} />
46+
<TitledTextBox title={TITLE} text={ABOUT_US} />
4747
{isError ? (
4848
<Notice
4949
alert={configureErrors([isError])}

pages/requests/[id].js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ import {
1616
import {
1717
configureErrors,
1818
createMessageOrFile,
19+
requestActionsBg,
20+
requestStatsHeaderBg,
21+
STATUS_ARRAY,
22+
statusBarBg,
1923
useMessages,
2024
useFiles,
2125
useAllSOWs,
2226
useOneRequest,
23-
STATUS_ARRAY,
2427
} from '../../utils'
2528

2629
const Request = () => {
@@ -79,15 +82,22 @@ const Request = () => {
7982

8083
return (
8184
<div className='container'>
82-
<StatusBar statusArray={STATUS_ARRAY} apiRequestStatus={request.status.text} addClass='mt-4' />
85+
<StatusBar
86+
addClass='mt-4'
87+
apiRequestStatus={request.status.text}
88+
backgroundColor={statusBarBg}
89+
statusArray={STATUS_ARRAY}
90+
/>
8391
<div className='row mb-4'>
8492
<div className='col-sm-4 col-md-3 mt-2 mt-sm-4 order-1 order-sm-0'>
8593
<ActionsGroup
94+
backgroundColor={requestActionsBg}
8695
initialFiles={files}
8796
handleSendingMessagesOrFiles={handleSendingMessagesOrFiles}
8897
/>
8998
<div className='mt-3'>
9099
<RequestStats
100+
addClass={requestStatsHeaderBg}
91101
billingInfo={{ ...request.billingAddress }}
92102
createdAt={request.createdAt}
93103
deadline={request.proposedDeadline}

pages/requests/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import {
88
RequestList,
99
} from '@scientist-softserv/webstore-component-library'
1010
import {
11+
buttonBg,
1112
configureErrors,
12-
dark,
13+
requestListBg,
1314
useDefaultWare,
1415
useAllRequests
1516
} from '../../utils'
@@ -58,14 +59,14 @@ const Requests = () => {
5859
<div className='text-end d-block mt-4 mb-2'>
5960
<LinkedButton
6061
buttonProps={{
61-
backgroundColor: dark,
62+
backgroundColor: buttonBg,
6263
label: 'Initiate a New Request',
6364
size: 'large',
6465
}}
6566
path={{ pathname: `/requests/new/make-a-request`, query: { id: defaultWareID } }}
6667
/>
6768
</div>
68-
<RequestList requests={requests} />
69+
<RequestList backgroundColor={requestListBg} requests={requests} />
6970
</div>
7071
)
7172
}

pages/requests/new/[ware].js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ import {
1515
} from '@scientist-softserv/webstore-component-library'
1616
import {
1717
addDays,
18+
buttonBg,
1819
configureErrors,
1920
createRequest,
21+
requestFormHeaderBg,
2022
useInitializeRequest,
2123
} from '../../../utils'
2224

@@ -183,17 +185,23 @@ const StandardRequestOptions = ({ defaultRequiredDate, requestForm, updateReques
183185
<div className='row'>
184186
<div className='col'>
185187
<ShippingDetails
188+
backgroundColor={requestFormHeaderBg}
186189
billingCountry={requestForm.billing.country}
187190
shippingCountry={requestForm.shipping.country}
188191
updateRequestForm={updateRequestForm}
189192
/>
190193
</div>
191194
<div className='col'>
192-
<AdditionalInfo updateRequestForm={updateRequestForm} defaultRequiredDate={defaultRequiredDate} />
195+
<AdditionalInfo
196+
updateRequestForm={updateRequestForm}
197+
defaultRequiredDate={defaultRequiredDate}
198+
backgroundColor={requestFormHeaderBg}
199+
/>
193200
</div>
194201
</div>
195202
<Button
196203
addClass='btn btn-primary my-4 ms-auto d-block'
204+
backgroundColor={buttonBg}
197205
label='Initiate Request'
198206
type='submit'
199207
size='large'

utils/api/configurations.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export const configureStatus = (status) => {
126126

127127
case 'SOW Submitted':
128128
case 'Estimate Submitted':
129+
case 'Selected for Work':
129130
status = 'SOW Selection'
130131
break
131132

@@ -156,7 +157,7 @@ export const configureMessages = (data) => {
156157
}
157158

158159
export const configureFiles = (data) => {
159-
// filter out the notes that do not have attachments
160+
// filter out the notes that do not have attachments
160161
const notesWithFiles = data.filter(d => d.attachments?.length !== 0)
161162
let fileArrays = []
162163

utils/constants.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { signIn, signOut } from 'next-auth/react'
2-
import logo from '../assets/svg/logo.svg'
1+
import logo from '../assets/svg/gps-logo-white.svg'
32
import item from '../assets/img/item.jpg'
43

54
export const DEFAULT_WARE_IMAGE = {
@@ -10,7 +9,7 @@ export const DEFAULT_WARE_IMAGE = {
109
export const TITLE = 'About Us'
1110

1211
/* eslint-disable max-len */
13-
export const TEXT = `Golden Pacific Sciences provides a range of products, Best Service Ever , and services within the life-science industry. We are able to support requests from the world’s top pharma companies and 100s of biotechs using Scientist.com.
12+
export const ABOUT_US = `Golden Pacific Sciences provides a range of products, Best Service Ever , and services within the life-science industry. We are able to support requests from the world’s top pharma companies and 100s of biotechs using Scientist.com.
1413
1514
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Odio aenean sed adipiscing diam donec adipiscing tristique. Eu lobortis elementum nibh tellus molestie. Mauris pellentesque pulvinar pellentesque habitant morbi tristique senectus et. Nisl purus in mollis nunc sed id semper risus in. Diam volutpat commodo sed egestas egestas fringilla. Lectus proin nibh nisl condimentum. Odio euismod lacinia at quis risus sed vulputate odio ut. Ac feugiat sed lectus vestibulum mattis ullamcorper. Iaculis at erat pellentesque adipiscing commodo elit at. Eget nullam non nisi est sit amet facilisis magna etiam. Faucibus turpis in eu mi bibendum neque egestas. Cursus mattis molestie a iaculis at erat pellentesque adipiscing.`
1615
/* eslint-enable max-len */

0 commit comments

Comments
 (0)