Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Remove category notice on recruiter form (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
dta-tyler authored May 12, 2022
1 parent 882c63f commit 183b4ef
Showing 1 changed file with 1 addition and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class RecruiterForm extends BaseForm {
}

state = {
checkboxLabel: '',
recruiter: this.props[this.props.model].recruiter,
hasLabourHireLicenceACT: false,
hasLabourHireLicenceQLD: false,
Expand All @@ -45,24 +44,8 @@ class RecruiterForm extends BaseForm {
checked: false
}

checkboxLabelWhenRecruiterConsultant = 'I understand that once my business is updated to both recruitment and consultancy in the Digital Marketplace, I will lose my current category approvals. I must request assessment from my dashboard and be approved in the relevant categories before I can respond to opportunities.'
checkboxLabelWhenConsultant = 'I understand that once my business is updated to a consultancy in the Digital Marketplace, I will lose my current category approvals. I must request assessment from my dashboard and be approved in the relevant categories before I can respond to opportunities.'

componentDidMount() {
const { labourHire } = this.props[this.props.model]
const { recruiter } = this.state

if (recruiter === 'both') {
this.setState({
checkboxLabel: this.checkboxLabelWhenRecruiterConsultant
})
}

if (recruiter === 'no') {
this.setState({
checkboxLabel: this.checkboxLabelWhenConsultant
})
}
const { labourHire } = this.props[this.props.model]

if (labourHire
&& labourHire.act
Expand Down Expand Up @@ -110,21 +93,11 @@ class RecruiterForm extends BaseForm {
recruiter: e.target.value
})

if (e.target.value === 'both') {
this.setState({
checkboxLabel: this.checkboxLabelWhenRecruiterConsultant,
})
}

if (e.target.value === 'no') {
states.forEach(s => {
updateProperty(`${model}.labourHire.${s}.expiry`, null)
updateProperty(`${model}.labourHire.${s}.licenceNumber`, null)
})

this.setState({
checkboxLabel: this.checkboxLabelWhenConsultant,
})
}
}

Expand Down Expand Up @@ -236,25 +209,6 @@ class RecruiterForm extends BaseForm {
return type === 'edit' && supplier.recruiter === 'yes'
}

UnderstandsProcessCheckbox = props => {
const { checked } = props
const { model, updateProperty } = this.props
const { checkboxLabel } = this.state

return (
<AUcheckbox
checked={checked}
id="understandsAssessmentProcess"
label={checkboxLabel}
name="understandsAssessmentProcess"
onChange={() => {}}
onClick={e => {
updateProperty(`${model}.understandsAssessmentProcess`, e.target.checked)
}}
/>
)
}

handleCheckboxClickACT = () => {
this.setState({ hasLabourHireLicenceACT: !this.state.hasLabourHireLicenceACT });
}
Expand Down Expand Up @@ -548,26 +502,6 @@ class RecruiterForm extends BaseForm {
</fieldset>
)}
{children}
{this.showAssessmentWarning() && (recruiter === 'both' || recruiter === 'no') && (
<React.Fragment>
<StatefulError
id="understandsAssessmentProcess"
model={`${model}.understandsAssessmentProcess`}
messages={{
required: 'Confirm you understand that once you submit these updates, you cannot respond to opportunities until you request an assessment and are approved for the relevant categories.'
}}
/>
<Control.checkbox
component={this.UnderstandsProcessCheckbox}
id="understandsAssessmentProcessControl"
mapProps={{
checked: prps => prps.modelValue
}}
model={`${model}.understandsAssessmentProcess`}
validators={{ required }}
/>
</React.Fragment>
)}
</div>
<StepNav buttonText="Save and continue" to={nextRoute}/>
</Form>
Expand Down

0 comments on commit 183b4ef

Please sign in to comment.