Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TICDI-81 checkbox update + TICDI-103 styling changes #233

Merged
merged 2 commits into from
Sep 6, 2024
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
5 changes: 3 additions & 2 deletions frontend/public/css/new.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
}

.collapsibleTitle {
font-size: 1.4rem;
/* font-family: Verdana, Geneva, sans-serif !important; */
font-size: 1.2rem;
font-family: Verdana, Geneva, sans-serif !important;
cursor: pointer;
margin-bottom: 0.5rem;
}

hr {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/components/common/Collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Collapsible: FC<CollapsibleProps> = ({ title, children, isOpen, enabled =
className={`inlineDiv collapsibleTitle`}
onClick={toggleCollapsibleOnClick}
/>
<div className={`ml-2 inlineDiv collapsibleTitle boldText`} onClick={toggleCollapsibleOnClick}>
<div className={`ml-2 inlineDiv collapsibleTitle`} onClick={toggleCollapsibleOnClick}>
{title}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ const AddProvisionModal: React.FC<AddProvisionModalProps> = ({ show, addProvisio
</Form.Group>

<Form.Group className="mb-3" style={{ marginLeft: '15px', marginTop: '30px' }}>
<Form.Check type="checkbox" label="Enable List" checked={listEnabled} onChange={handleListEnabledChange} />
<Form.Check
type="checkbox"
id="listEnabledCheckbox"
label={<label htmlFor="listEnabledCheckbox">Enable List</label>}
checked={listEnabled}
onChange={handleListEnabledChange}
/>
</Form.Group>

{listEnabled ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ const EditProvisionModalForm: React.FC<EditProvisionModalFormProps> = ({
</Form.Group>

<Form.Group className="mb-3" style={{ marginLeft: '15px', marginTop: '30px' }}>
<Form.Check type="checkbox" label="Enable List" checked={listEnabled} onChange={handleListEnabledChange} />
<Form.Check
type="checkbox"
id="listEnabledCheckbox"
label={<label htmlFor="listEnabledCheckbox">Enable List</label>}
checked={listEnabled}
onChange={handleListEnabledChange}
/>
</Form.Group>

{listEnabled ? (
Expand Down
23 changes: 14 additions & 9 deletions frontend/src/app/content/pages/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ const LandingPage: FC = () => {
<div className="h1">{documentType ? `Preview - ${documentType.name}` : 'Document Preview'}</div>
<hr />
<div className="mb-3 mt-3">
<div className="font-weight-bold inlineDiv">DTID:</div>
<div className="inlineDiv">
<b>DTID:</b>
</div>
<div className="inlineDiv ml-4 mr-4">
<input
type="number"
Expand Down Expand Up @@ -432,29 +434,35 @@ const LandingPage: FC = () => {
Clear
</Button>
</div>

{showError && (
<Alert variant="danger" className="mb-3 d-inline-block" style={{ width: 'auto', maxWidth: '100%' }}>
{error}
</Alert>
)}
<div className="mb-3">
<div className="font-weight-bold inlineDiv mr-1">Tenure File Number:</div>
<div className="inlineDiv mr-1">
<b>Tenure File Number:</b>
</div>
<div className="inlineDiv" id="tfn">
{data?.fileNum || <Skeleton />}
</div>
</div>
<div className="mb-3">
<div className="font-weight-bold inlineDiv mr-1">Primary Contact Name:</div>
<div className="inlineDiv mr-1">
<b>Primary Contact Name:</b>
</div>
<div className="inlineDiv">{data?.primaryContactName}</div>
</div>
<h3>Create Document</h3>
<Row className="mb-3">
<div className="ml-3 mr-3">
<div className="ml-3">
<b>Document Type:</b>
</div>
<div>
</Row>
<Row className="mb-3">
<div className="ml-3">
<select
className="form-control"
value={selectedDocTypeId || ''}
disabled={loading || !dtid || !data || showError}
onChange={handleDocTypeChange}
Expand All @@ -477,19 +485,16 @@ const LandingPage: FC = () => {
<Collapsible title="Interested Parties" isOpen={isOpen}>
{data ? <InterestedParties data={data!} /> : <Skeleton />}
</Collapsible>

<Collapsible title="Provisions" isOpen={false} enabled={provisionGroups && dtid && documentType ? true : false}>
{provisionGroups && dtid && documentType ? (
<Provisions dtid={dtid} documentType={documentType} provisionGroups={provisionGroups} />
) : (
<></>
)}
</Collapsible>

<Collapsible title="Variables" isOpen={false} enabled={provisionGroups && dtid && documentType ? true : false}>
{provisionGroups && dtid && documentType ? <VariablesTable onVariableEdit={handleVariableEdit} /> : <></>}
</Collapsible>

<>
{' '}
{showGenerateError && (
Expand Down
Loading