CINXE.COM

Add Director/Supervisor/Manager

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Add Director/Supervisor/Manager</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.4.1/pulse/bootstrap.min.css"> <link rel="stylesheet" href="https://unpkg.com/bootstrap-vue@2.15.0/dist/bootstrap-vue.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.1/css/all.css"> <link rel="stylesheet" href="https://unpkg.com/vue-select@3.10.5/dist/vue-select.css"> <script src="https://unpkg.com/@babel/polyfill@7.4.4/dist/polyfill.min.js"></script> <script src="https://unpkg.com/vue@2.6.11/dist/vue.min.js"></script> <script src="https://unpkg.com/bootstrap-vue@2.15.0/dist/bootstrap-vue.min.js"></script> <script src="https://unpkg.com/lodash@4.17.15/lodash.min.js"></script> <script src="https://unpkg.com/axios@1.7.4/dist/axios.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fetch-jsonp/1.1.3/fetch-jsonp.min.js"></script> <script src="https://unpkg.com/vue-select@3.10.5"></script> <style> .form-group { margin-bottom: 0.5rem; } .vs__dropdown-toggle { border-radius: 0px; } .vs__search { height: 2em; } </style> </head> <body> <div id="app" class="mb-3" style="display:none"> <b-navbar toggleable="lg" type="dark" variant="primary"> <b-navbar-brand href="#">Consumer and Business Services</b-navbar-brand> </b-navbar> <b-row class="mx-0"> <b-col xl="6" offset-xl="3" lg="8" offset-lg="2" md="10" offset-md="1"> <div class="m-1"> <b-button variant="outline-primary" class="m-1" href="./">Renew Online</b-button> <b-button variant="outline-primary" class="m-1" href="./extension.php">Request an Extension</b-button> <b-button variant="outline-primary" class="m-1" href="./change_address.php">Change Address</b-button> <b-button variant="outline-primary" class="m-1" href="../OccLicPubReg/ConsentCapture.php">Update Email/Phone</b-button> <b-button variant="primary" class="m-1" href="./add_director_supervisor.php">Add Director/Supervisor/Manager</b-button> <b-button variant="outline-primary" class="m-1" href="./retrieve_client_id.php">Retrieve Client ID</b-button> <b-button variant="outline-primary" class="m-1" href="../ALLP/">Pay Liquor Licence Fees</b-button> </div> <!--START MAINTENANCE ALERT--> <!--END MAINTENANCE ALERT--> <b-card title="Add Director/Supervisor/Manager" class="m-2"> <b-form-group label="Licence type"> <b-form-select v-model="searchForm.licClassCode" :options="licClassCodes"></b-form-select> </b-form-group> <b-form-group label="Lic/Reg No."> <b-form-input v-model="searchForm.licNum" placeholder="numbers only" maxlength="6"></b-form-input> </b-form-group> <b-form-group label="Client ID"> <b-form-input v-model="searchForm.clientID" placeholder="numbers only" maxlength="6"></b-form-input> <template #description> <a href="retrieve_client_id.php">Don't have Client ID?</a> </template> </b-form-group> <b-row> <b-col cols="6"> <b-button type="submit" variant="primary" @click="getLicenceDetails" :disabled="isSearching" class="float-right"><b-spinner v-if="isSearching" small class="mx-2"></b-spinner><span v-else>Search</span></b-button> </b-col> <b-col cols="6"> <b-button type="reset" variant="secondary" @click="step = 1; isSuccess = false; isError = false; searchForm = {licClassCode: null, licNum: null};">Clear</b-button> </b-col> </b-row> </b-card> <b-card v-if="step == 2" class="m-2"> <table class="table table-sm mb-0"> <tr> <td>Licence Owner:</td> <td>{{response.Licensee}}</td> </tr> <tr> <td>Licence Status:</td> <td>{{response.LicenceStatus}}</td> </tr> </table> <div v-if="response.LicClassCode == 'BLD'" class="mt-3"> <b-form-radio-group v-model="adsForm.directorsSupervisorsManagers" @input="step = 3" :options="[{value: 'D', text: 'I wish to add/remove directors'}, {value: 'S', text: 'I wish to add/remove supervisors'}]" stacked class="ml-1"></b-form-radio-group> </div> <div v-if="['ISL','MVD','RLA'].indexOf(response.LicClassCode) > -1" class="mt-3"> <b-form-radio-group v-model="adsForm.directorsSupervisorsManagers" @input="step = 3" :options="[{value: 'D', text: 'I wish to add/remove directors'}, {value: 'M', text: 'I wish to add/remove managers'}]" stacked class="ml-1"></b-form-radio-group> </div> </b-card> <div role="tablist" v-if="step == 3" class="m-2"> <b-card no-body class="mb-1"> <!-- REMOVE EXISTING --> <template v-if="response.Directors.length > 0 || response.Supervisors.length > 0"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block href="#" v-b-toggle.accordion-remove-existing variant="light"> Remove existing {{directorsSupervisorsManagers}} </b-button> </b-card-header> <b-collapse v-model="accordionVisible[0]" id="accordion-remove-existing" accordion="accordion" role="tabpanel"> <b-card-body> <div class="text-center"> <strong>Do you wish to remove any of the existing {{directorsSupervisorsManagers}}:</strong> <b-form-radio-group v-model="adsForm.removeExistingYesNo" @input="yesNo => {if (yesNo == 'No') openNextAccordion('accordion-remove-existing')}" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> </div> <div v-if="adsForm.removeExistingYesNo == 'Yes'" class="mt-3"> <div v-if="response.Directors.length > 0 && adsForm.directorsSupervisorsManagers == 'D'"> <b-form-checkbox-group stacked v-model="adsForm.removeDirectors"> <b-form-checkbox v-for="(director, i) in response.Directors" :key="i" :value="director.Name"> <span :style="{textDecorationLine: adsForm.removeDirectors.indexOf(director.Name) > -1 ? 'line-through' : ''}">{{director.Name}}</span> </b-form-checkbox> </b-form-checkbox-group> </div> <div v-if="response.Supervisors.length > 0 && adsForm.directorsSupervisorsManagers == 'S'" class="mt-3"> <b-form-checkbox-group stacked v-model="adsForm.removeSupervisors"> <b-form-checkbox v-for="(supervisor, i) in response.Supervisors" :key="i" :value="supervisor.Name"> <span :style="{textDecorationLine: adsForm.removeSupervisors.indexOf(supervisor.Name) > -1 ? 'line-through' : ''}">{{supervisor.Name}}</span> </b-form-checkbox> </b-form-checkbox-group> </div> <div v-if="response.Managers.length > 0 && adsForm.directorsSupervisorsManagers == 'M'" class="mt-3"> <b-form-checkbox-group stacked v-model="adsForm.removeManagers"> <b-form-checkbox v-for="(manager, i) in response.Managers" :key="i" :value="manager.Name"> <span :style="{textDecorationLine: adsForm.removeManagers.indexOf(manager.Name) > -1 ? 'line-through' : ''}">{{manager.Name}}</span> </b-form-checkbox> </b-form-checkbox-group> </div> </div> <div v-if="adsForm.removeExistingYesNo" class="text-center mt-2"> <b-button variant="primary" @click="openNextAccordion('accordion-remove-existing')">Next</b-button> </div> </b-card-body> </b-collapse> </template> <!-- ADD DIRECTOR --> <template v-if="adsForm.directorsSupervisorsManagers == 'D'"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block href="#" v-b-toggle.accordion-add-director variant="light"> Add director/s </b-button> </b-card-header> <b-collapse v-model="accordionVisible[1]" id="accordion-add-director" accordion="accordion" role="tabpanel"> <b-card-body> <div class="text-center"> <strong>Do you wish to add director/s:</strong> <b-form-radio-group v-model="adsForm.addDirectorYesNo" @input="yesNo => {if (yesNo == 'No') openNextAccordion('accordion-add-director')}" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> </div> <div v-if="adsForm.addDirectorYesNo == 'Yes'" class="mt-3"> <div v-for="(dir, i) in adsForm.newDirectors" :key="i"> <hr v-if="i > 0"> <div style="background-color:#ccc; padding: 3px 6px; margin: 5px 0px;"> <strong>Director {{i+1}}: {{dir.givenName1.toUpperCase()}} {{dir.surname.toUpperCase()}}</strong> </div> <b-row> <b-col sm="3"> <b-form-group label="Title"> <b-form-select v-model="adsForm.newDirectors[i].title" :options="['Mr', 'Mrs', 'Ms', 'Miss']" @change="val => adsForm.newDirectors[i].gender = (val == 'Mr' ? 'M' : 'F')"></b-form-select> </b-form-group> </b-col> <b-col sm="3"> <b-form-group label="Given names"> <b-form-input v-model="adsForm.newDirectors[i].givenName1" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newDirectors[i].givenName2" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newDirectors[i].givenName3" trim></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Surname"> <b-form-input v-model="adsForm.newDirectors[i].surname" trim></b-form-input> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Date of birth"> <b-form-datepicker v-model="adsForm.newDirectors[i].birthDate" show-decade-nav initial-date="1980-01-01" :date-format-options="{ year: 'numeric', month: 'numeric', day: 'numeric' }" locale="en-AU"></b-form-datepicker> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Gender"> <b-form-select v-model="adsForm.newDirectors[i].gender" :options="[{value: 'M', text: 'Male'}, {value: 'F', text: 'Female'}]"></b-form-select> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Phone number"> <b-form-input v-model="adsForm.newDirectors[i].phoneNumber" trim></b-form-input> </b-form-group> </b-col> </b-row> <strong>Residential address</strong> <div class='my-1'> <v-select v-model='adsForm.newDirectors[i].resid.Search' :options='addressCandidates' placeholder='Address search' label='address' @search='onSearch' :filterable='false' @input="val => selectAddress(val, 'resid', 'newDirectors', i)"> <template v-slot:no-options='{search, searching}'> <span v-if="searching && search.split(' ').length < 3">Type some more...</span> <span v-else-if='searching'>No address found. Please enter address manually.</span> <span v-else>Start typing...</span> </template> </v-select> </div><b-row > <b-col sm='6'> <b-form-group label='Level'> <b-form-input v-model='adsForm.newDirectors[i].resid.LevelNumber' name='residlevel' trim :state='adsForm.newDirectors[i].resid.LevelNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='6'> <b-form-group label='Unit'> <b-form-input v-model='adsForm.newDirectors[i].resid.UnitNumber' name='residunit' trim :state='adsForm.newDirectors[i].resid.UnitNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row > <b-col sm='4'> <b-form-group label='Street number'> <b-form-input v-model='adsForm.newDirectors[i].resid.HouseNumber' name='residaddressno' trim :state='adsForm.newDirectors[i].resid.HouseNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street name'> <b-form-input v-model='adsForm.newDirectors[i].resid.StreetName' name='residstreetname' trim :state='adsForm.newDirectors[i].resid.StreetName.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street type'> <b-form-input v-model='adsForm.newDirectors[i].resid.StreetType' name='residstreettype' trim :state='adsForm.newDirectors[i].resid.StreetType.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4'> <b-form-group label='Suburb'> <b-form-input v-model='adsForm.newDirectors[i].resid.Locality' name='residsuburb' trim :state='adsForm.newDirectors[i].resid.Locality.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='State'> <b-form-input v-model='adsForm.newDirectors[i].resid.State' name='residstate' maxlength='16' trim :state='adsForm.newDirectors[i].resid.State.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Postcode'> <b-form-input v-model='adsForm.newDirectors[i].resid.Postcode' name='residpcode' maxlength='6' trim :state='adsForm.newDirectors[i].resid.Postcode.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4' class='mb-2'> <b-form-group label='Country'> <b-form-input v-model='adsForm.newDirectors[i].resid.Country' name='residcountry' trim :state='adsForm.newDirectors[i].resid.Country.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <strong>Service (postal) address</strong> (same as residential <b-button variant="outline-primary" @click="cloneAddress('newDirectors', i)"><i class="fas fa-chevron-down"></i></b-button>) <div class='my-1'> <v-select v-model='adsForm.newDirectors[i].serv.Search' :options='addressCandidates' placeholder='Address search' label='address' @search='onSearch' :filterable='false' @input="val => selectAddress(val, 'serv', 'newDirectors', i)"> <template v-slot:no-options='{search, searching}'> <span v-if="searching && search.split(' ').length < 3">Type some more...</span> <span v-else-if='searching'>No address found. Please enter address manually.</span> <span v-else>Start typing...</span> </template> </v-select> </div>Is this a PO Box address? <b-form-radio-group v-model='adsForm.newDirectors[i].serv.IsPoBox' :options="[{value: 'on', text: 'Yes'}, {value: 'off', text: 'No'}]" buttons button-variant='outline-primary' name='servpobox_cb' class='ml-3'></b-form-radio-group> <b-row> <b-col sm='6'> <b-form-group v-if="adsForm.newDirectors[i].serv.IsPoBox == 'on'" label='PO Box Details'> <b-form-input v-model='adsForm.newDirectors[i].serv.PoBoxDetails' @blur="formatPoBox('newDirectors', i)" name='servpobox' trim :state='adsForm.newDirectors[i].serv.PoBoxDetails.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row><b-row v-if="adsForm.newDirectors[i].serv.IsPoBox == 'off'"> <b-col sm='6'> <b-form-group label='Level'> <b-form-input v-model='adsForm.newDirectors[i].serv.LevelNumber' name='servlevel' trim :state='adsForm.newDirectors[i].serv.LevelNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='6'> <b-form-group label='Unit'> <b-form-input v-model='adsForm.newDirectors[i].serv.UnitNumber' name='servunit' trim :state='adsForm.newDirectors[i].serv.UnitNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row v-if="adsForm.newDirectors[i].serv.IsPoBox == 'off'"> <b-col sm='4'> <b-form-group label='Street number'> <b-form-input v-model='adsForm.newDirectors[i].serv.HouseNumber' name='servaddressno' trim :state='adsForm.newDirectors[i].serv.HouseNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street name'> <b-form-input v-model='adsForm.newDirectors[i].serv.StreetName' name='servstreetname' trim :state='adsForm.newDirectors[i].serv.StreetName.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street type'> <b-form-input v-model='adsForm.newDirectors[i].serv.StreetType' name='servstreettype' trim :state='adsForm.newDirectors[i].serv.StreetType.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4'> <b-form-group label='Suburb'> <b-form-input v-model='adsForm.newDirectors[i].serv.Locality' name='servsuburb' trim :state='adsForm.newDirectors[i].serv.Locality.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='State'> <b-form-input v-model='adsForm.newDirectors[i].serv.State' name='servstate' maxlength='16' trim :state='adsForm.newDirectors[i].serv.State.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Postcode'> <b-form-input v-model='adsForm.newDirectors[i].serv.Postcode' name='servpcode' maxlength='6' trim :state='adsForm.newDirectors[i].serv.Postcode.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4' class='mb-2'> <b-form-group label='Country'> <b-form-input v-model='adsForm.newDirectors[i].serv.Country' name='servcountry' trim :state='adsForm.newDirectors[i].serv.Country.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <div v-if="adsForm.newDirectors.length == i+1" class="mb-3"> <b-button variant="success" @click="addAnotherDirector">Add another</b-button> <b-button v-if="i > 0" variant="danger" @click="deleteDirector(i)">Delete</b-button> </div> </div> <hr> <template v-if="adsForm.licClassCode != 'LHS'"> <div class="mt-3"> Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth? <b-form-radio-group v-model="adsForm.directorsSuspendedYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsSuspendedYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsSuspendedDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsSuspendedYesNo" class="mt-3"> <hr> Are any of the new directors currently an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors? <b-form-radio-group v-model="adsForm.directorsInsolventYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsInsolventYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsInsolventDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsInsolventYesNo" class="mt-3"> <hr> Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up? <b-form-radio-group v-model="adsForm.directorsWoundUpYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsWoundUpYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsWoundUpDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsWoundUpYesNo" class="mt-3"> <hr> Have any of the new directors ever been convicted of any offences or are any court proceedings pending? <b-form-radio-group v-model="adsForm.directorsConvictedYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsConvictedYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsConvictedDetails" trim></b-form-textarea> </b-form-group> </div> </template> <template v-else> <div class="mt-3"> Have any of the new directors had an application for a Labour Hire licence refused in the previous 12 months? <b-form-radio-group v-model="adsForm.directorsLhsRefusedYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsRefusedYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsRefusedDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsRefusedYesNo" class="mt-3"> <hr> Have any of the new directors had a Labour Hire licence cancelled under section 23 of Labour Hire Licensing Act 2017 in the last two years? <b-form-radio-group v-model="adsForm.directorsLhsCancelledYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsCancelledYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsCancelledDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsCancelledYesNo" class="mt-3"> <hr> Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth? <b-form-radio-group v-model="adsForm.directorsLhsSuspendedYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsSuspendedYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsSuspendedDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsSuspendedYesNo" class="mt-3"> <hr> Have any of the new directors ever been an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors? <b-form-radio-group v-model="adsForm.directorsLhsInsolventYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsInsolventYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsInsolventDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsInsolventYesNo" class="mt-3"> <hr> Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up? <b-form-radio-group v-model="adsForm.directorsLhsWoundUpYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsWoundUpYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsWoundUpDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsWoundUpYesNo" class="mt-3"> <hr> Are any of the new directors members of, or a participant in, a prescribed organisation? <b-form-radio-group v-model="adsForm.directorsLhsPrescribedYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsPrescribedYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsPrescribedDetails" trim></b-form-textarea> </b-form-group> </div> <div v-if="adsForm.directorsLhsPrescribedYesNo" class="mt-3"> <hr> Are any of the new directors close associates of a person who is a member of a prescribed organisation or is subject to a control order under the Serious and Organised Crime (Control) Act 2008? <b-form-radio-group v-model="adsForm.directorsLhsAssociatesYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> <b-form-group v-if="adsForm.directorsLhsAssociatesYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsLhsAssociatesDetails" trim></b-form-textarea> </b-form-group> </div> </template> <div v-if="(adsForm.licClassCode != 'ISL' && adsForm.licClassCode != 'LHS' && adsForm.directorsConvictedYesNo) || (adsForm.licClassCode == 'LHS' && adsForm.directorsLhsAssociatesYesNo)" class="mt-3"> <hr> Do any of the following situations apply to any of the directors? <ul> <li v-for="(li, i) in adsForm.directorsNpcList" :key="i">{{li}}</li> </ul> <b-form-radio-group v-model="adsForm.directorsNpcYesNo" :options="['Yes', 'No']" buttons button-variant="outline-primary"></b-form-radio-group> <b-form-group v-if="adsForm.directorsNpcYesNo == 'Yes'" label="Please provide details:"> <b-form-textarea v-model="adsForm.directorsNpcDetails" trim></b-form-textarea> </b-form-group> <b-alert v-if="adsForm.directorsNpcYesNo == 'No'" variant="info" show class="mt-3"> Each director will be required to supply a National Police Certificate that is no more than 12 months old from the date you lodge your application. A National Police Certificate can be obtained through state and territory police departments and the Australian Federal Police. Alternatively, National Criminal History/Record Checks can be obtained from CV Check Pty Ltd (www.cvcheck.biz) or an Australian Criminal Intelligence Commission Accredited Organisation (www.acic.gov.au for further information).<br>IMPORTANT: Checks that simply verify you are able to work with particular persons (e.g. children) without specifying your criminal history are not sufficient. </b-alert> </div> </div> <div v-if="(adsForm.licClassCode != 'ISL' && adsForm.directorsNpcYesNo) || (adsForm.licClassCode == 'ISL' && adsForm.directorsWoundUpYesNo) || (adsForm.licClassCode == 'LHS' && adsForm.directorsLhsAssociatesYesNo)" class="text-center mt-3"> <b-button variant="primary" @click="openNextAccordion('accordion-add-director')">Next</b-button> </div> </b-card-body> </b-collapse> </template> <!-- ADD SUPERVISOR --> <template v-if="adsForm.directorsSupervisorsManagers == 'S'"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block href="#" v-b-toggle.accordion-add-supervisor variant="light"> Add supervisor/s </b-button> </b-card-header> <b-collapse v-model="accordionVisible[2]" id="accordion-add-supervisor" accordion="accordion" role="tabpanel"> <b-card-body> <div class="text-center"> <strong>Do you wish to add supervisor/s:</strong> <b-form-radio-group v-model="adsForm.addSupervisorYesNo" @input="yesNo => {if (yesNo == 'No') openNextAccordion('accordion-add-supervisor')}" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> </div> <div v-if="adsForm.addSupervisorYesNo == 'Yes'" class="mt-3"> <div v-for="(sup, i) in adsForm.newSupervisors" :key="i"> <hr v-if="i > 0"> <div style="background-color:#ccc; padding: 3px 6px; margin: 5px 0px;"> <strong> Registered building work supervisor / architect {{i+1}}: <span v-if="sup.type == 'Existing'">{{sup.licensee}}</span> <span v-else>{{sup.givenName1.toUpperCase()}} {{sup.surname.toUpperCase()}}</span> </strong> </div> <b-form-group> <b-form-radio v-model="sup.type" value="Existing">This person holds a building work supervisor registration or a plumbing, gas fitting or electrical work worker registration</b-form-radio> <b-form-radio v-model="sup.type" value="Pending">This person has recently applied for a building work supervisor registration or a plumbing, gas fitting or electrical work worker registration and is pending approval</b-form-radio> <b-form-radio v-model="sup.type" value="Architect">This person is a <a href="https://www.archboardsa.org.au/architects-architectural-business" target="_blank">registered architect</a></b-form-radio> </b-form-group> <!-- Existing --> <div v-if="sup.type == 'Existing'"> <div> <label>Licence number</label> <table> <tr> <td> <b-form-select v-model="sup.licClassCode" :options="['BLD', 'PGE']" style="width: 80px"></b-form-select> </td> <td> <b-form-input v-model="sup.licNum" trim maxlength="6" style="width: 80px"></b-form-input> </td> <td> <b-button variant="primary" @click="checkLicence(sup)"><b-spinner v-if="isChecking" small class="mx-2"></b-spinner><span v-else>Check</span></b-button> </td> </tr> </table> </div> <div class="my-3"> <b-form-input v-if="sup.licensee" :value="sup.licensee" readonly></b-form-input> <b-alert v-else-if="sup.errorMsg" show variant="danger">{{sup.errorMsg}}</b-alert> </div> </div> <!-- Pending --> <div v-else-if="sup.type == 'Pending'"> <b-row> <b-col sm="3"> <b-form-group label="Title"> <b-form-select v-model="adsForm.newSupervisors[i].title" :options="['Mr', 'Mrs', 'Ms', 'Miss']" @change="val => adsForm.newSupervisors[i].gender = (val == 'Mr' ? 'M' : 'F')"></b-form-select> </b-form-group> </b-col> <b-col sm="3"> <b-form-group label="Given names"> <b-form-input v-model="adsForm.newSupervisors[i].givenName1" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newSupervisors[i].givenName2" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newSupervisors[i].givenName3" trim></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Surname"> <b-form-input v-model="adsForm.newSupervisors[i].surname" trim></b-form-input> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Date of birth"> <b-form-datepicker v-model="adsForm.newSupervisors[i].birthDate" show-decade-nav initial-date="1980-01-01" :date-format-options="{ year: 'numeric', month: 'numeric', day: 'numeric' }" locale="en-AU"></b-form-datepicker> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Gender"> <b-form-select v-model="adsForm.newSupervisors[i].gender" :options="[{value: 'M', text: 'Male'}, {value: 'F', text: 'Female'}]"></b-form-select> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Phone number"> <b-form-input v-model="adsForm.newSupervisors[i].phoneNumber" trim></b-form-input> </b-form-group> </b-col> </b-row> </div> <!-- Architect --> <div v-else-if="sup.type == 'Architect'"> <b-row> <b-col sm="3"> <b-form-group label="Registration number"> <b-form-input v-model="sup.regNo" trim></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="3"> <b-form-group label="Title"> <b-form-select v-model="adsForm.newSupervisors[i].title" :options="['Mr', 'Mrs', 'Ms', 'Miss']" @change="val => adsForm.newSupervisors[i].gender = (val == 'Mr' ? 'M' : 'F')"></b-form-select> </b-form-group> </b-col> <b-col sm="3"> <b-form-group label="Given names"> <b-form-input v-model="adsForm.newSupervisors[i].givenName1" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newSupervisors[i].givenName2" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newSupervisors[i].givenName3" trim></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Surname"> <b-form-input v-model="adsForm.newSupervisors[i].surname" trim></b-form-input> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Date of birth"> <b-form-datepicker v-model="adsForm.newSupervisors[i].birthDate" show-decade-nav initial-date="1980-01-01" :date-format-options="{ year: 'numeric', month: 'numeric', day: 'numeric' }" locale="en-AU"></b-form-datepicker> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Gender"> <b-form-select v-model="adsForm.newSupervisors[i].gender" :options="[{value: 'M', text: 'Male'}, {value: 'F', text: 'Female'}]"></b-form-select> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Phone number"> <b-form-input v-model="adsForm.newSupervisors[i].phoneNumber" trim></b-form-input> </b-form-group> </b-col> </b-row> </div> <div class="mb-3" v-if="sup.type && adsForm.newSupervisors.length == i+1"> <b-button variant="success" @click="addAnotherSupervisor">Add another</b-button> <b-button v-if="i > 0" variant="danger" @click="deleteSupervisor(i)">Delete</b-button> </div> </div> </div> <div v-if="(adsForm.addSupervisorYesNo == 'Yes' && adsForm.newSupervisors[0].type) || adsForm.addSupervisorYesNo == 'No'" class="text-center mt-2"> <b-button variant="primary" @click="openNextAccordion('accordion-add-supervisor')">Next</b-button> </div> </b-card-body> </b-collapse> </template> <!-- ADD MANAGER --> <template v-if="adsForm.directorsSupervisorsManagers == 'M'"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block href="#" v-b-toggle.accordion-add-manager variant="light"> Add manager/s </b-button> </b-card-header> <b-collapse v-model="accordionVisible[2]" id="accordion-add-manager" accordion="accordion" role="tabpanel"> <b-card-body> <div class="text-center"> <strong>Do you wish to add manager/s:</strong> <b-form-radio-group v-model="adsForm.addManagerYesNo" @input="yesNo => {if (yesNo == 'No') openNextAccordion('accordion-add-manager')}" :options="['Yes', 'No']" buttons button-variant="outline-primary" class="ml-3"></b-form-radio-group> </div> <div v-if="adsForm.addManagerYesNo == 'Yes'" class="mt-3"> <div v-for="(mgr, i) in adsForm.newManagers" :key="i"> <hr v-if="i > 0"> <div style="background-color:#ccc; padding: 3px 6px; margin: 5px 0px;"> <strong> Nominated manager {{i+1}}: <span v-if="mgr.type == 'Existing'">{{mgr.licensee}}</span> <span v-else>{{mgr.givenName1.toUpperCase()}} {{mgr.surname.toUpperCase()}}</span> </strong> </div> <b-form-group> <b-form-radio v-model="mgr.type" value="Existing">This person holds a {{licenceClassLong}}</b-form-radio> <b-form-radio v-model="mgr.type" value="Pending">This person has recently applied for a {{licenceClassLong}} and is pending approval</b-form-radio> <b-form-radio v-model="mgr.type" value="AMR">This person holds an interstate {{licenceClassLong}} and has notified CBS (AMR licensee)</b-form-radio> </b-form-group> <!-- Existing --> <div v-if="mgr.type == 'Existing'"> <div> <label>Licence number</label> <table> <tr> <td> <b-form-select v-model="mgr.licClassCode" :options="mgrLicClassCodes" style="width: 80px"></b-form-select> </td> <td> <b-form-input v-model="mgr.licNum" trim maxlength="6" style="width: 80px"></b-form-input> </td> <td> <b-button variant="primary" @click="checkLicence(mgr)"><b-spinner v-if="isChecking" small class="mx-2"></b-spinner><span v-else>Check</span></b-button> </td> </tr> </table> </div> <div class="my-3"> <b-form-input v-if="mgr.licensee" :value="mgr.licensee" readonly></b-form-input> <b-alert v-else-if="mgr.errorMsg" show variant="danger">{{mgr.errorMsg}}</b-alert> </div> </div> <!-- Pending --> <div v-else-if="mgr.type == 'Pending' || mgr.type == 'AMR'"> <b-row> <b-col sm="3"> <b-form-group label="Title"> <b-form-select v-model="adsForm.newManagers[i].title" :options="['Mr', 'Mrs', 'Ms', 'Miss']" @change="val => adsForm.newManagers[i].gender = (val == 'Mr' ? 'M' : 'F')"></b-form-select> </b-form-group> </b-col> <b-col sm="3"> <b-form-group label="Given names"> <b-form-input v-model="adsForm.newManagers[i].givenName1" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newManagers[i].givenName2" trim></b-form-input> </b-form-group> </b-col> <b-col sm="3"> <b-form-group> <template #label>&nbsp;</template> <b-form-input v-model="adsForm.newManagers[i].givenName3" trim></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Surname"> <b-form-input v-model="adsForm.newManagers[i].surname" trim></b-form-input> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Date of birth"> <b-form-datepicker v-model="adsForm.newManagers[i].birthDate" show-decade-nav initial-date="1980-01-01" :date-format-options="{ year: 'numeric', month: 'numeric', day: 'numeric' }" locale="en-AU"></b-form-datepicker> </b-form-group> </b-col> </b-row> <b-row> <b-col sm="6"> <b-form-group label="Gender"> <b-form-select v-model="adsForm.newManagers[i].gender" :options="[{value: 'M', text: 'Male'}, {value: 'F', text: 'Female'}]"></b-form-select> </b-form-group> </b-col> <b-col sm="6"> <b-form-group label="Phone number"> <b-form-input v-model="adsForm.newManagers[i].phoneNumber" trim></b-form-input> </b-form-group> </b-col> </b-row> </div> <div v-if="adsForm.licClassCode == 'RLA'"> Address this manager will be responsible for: <div class='my-1'> <v-select v-model='adsForm.newManagers[i].branch.Search' :options='addressCandidates' placeholder='Address search' label='address' @search='onSearch' :filterable='false' @input="val => selectAddress(val, 'branch', 'newManagers', i)"> <template v-slot:no-options='{search, searching}'> <span v-if="searching && search.split(' ').length < 3">Type some more...</span> <span v-else-if='searching'>No address found. Please enter address manually.</span> <span v-else>Start typing...</span> </template> </v-select> </div><b-row > <b-col sm='6'> <b-form-group label='Level'> <b-form-input v-model='adsForm.newManagers[i].branch.LevelNumber' name='branchlevel' trim :state='adsForm.newManagers[i].branch.LevelNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='6'> <b-form-group label='Unit'> <b-form-input v-model='adsForm.newManagers[i].branch.UnitNumber' name='branchunit' trim :state='adsForm.newManagers[i].branch.UnitNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row > <b-col sm='4'> <b-form-group label='Street number'> <b-form-input v-model='adsForm.newManagers[i].branch.HouseNumber' name='branchaddressno' trim :state='adsForm.newManagers[i].branch.HouseNumber.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street name'> <b-form-input v-model='adsForm.newManagers[i].branch.StreetName' name='branchstreetname' trim :state='adsForm.newManagers[i].branch.StreetName.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Street type'> <b-form-input v-model='adsForm.newManagers[i].branch.StreetType' name='branchstreettype' trim :state='adsForm.newManagers[i].branch.StreetType.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4'> <b-form-group label='Suburb'> <b-form-input v-model='adsForm.newManagers[i].branch.Locality' name='branchsuburb' trim :state='adsForm.newManagers[i].branch.Locality.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='State'> <b-form-input v-model='adsForm.newManagers[i].branch.State' name='branchstate' maxlength='16' trim :state='adsForm.newManagers[i].branch.State.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> <b-col sm='4'> <b-form-group label='Postcode'> <b-form-input v-model='adsForm.newManagers[i].branch.Postcode' name='branchpcode' maxlength='6' trim :state='adsForm.newManagers[i].branch.Postcode.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> <b-row> <b-col sm='4' class='mb-2'> <b-form-group label='Country'> <b-form-input v-model='adsForm.newManagers[i].branch.Country' name='branchcountry' trim :state='adsForm.newManagers[i].branch.Country.length > 0 ? true : null'></b-form-input> </b-form-group> </b-col> </b-row> </div> <div class="mb-3" v-if="mgr.type && adsForm.newManagers.length == i+1"> <b-button variant="success" @click="addAnotherManager">Add another</b-button> <b-button v-if="i > 0" variant="danger" @click="deleteManager(i)">Delete</b-button> </div> </div> </div> <div v-if="(adsForm.addManagerYesNo == 'Yes' && adsForm.newManagers[0].type) || adsForm.addManagerYesNo == 'No'" class="text-center mt-2"> <b-button variant="primary" @click="openNextAccordion('accordion-add-manager')">Next</b-button> </div> </b-card-body> </b-collapse> </template> <!-- CONTACT DETAILS --> <template> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block href="#" v-b-toggle.accordion-contact-details variant="light"> Your contact details </b-button> </b-card-header> <b-collapse v-model="accordionVisible[3]" id="accordion-contact-details" :visible="response.Directors.length > 0 || response.Supervisors.length > 0" accordion="accordion" role="tabpanel"> <b-card-body> <div> <b-form-group label="Email Address"> <b-form-input type="email" v-model="adsForm.emailAddress" trim></b-form-input> </b-form-group> <b-form-group label="Mobile Phone"> <b-form-input type="text" v-model="adsForm.mobileNumber"></b-form-input> </b-form-group> </div> <div class="text-center mt-2"> <b-button variant="primary" @click="if (validateForm()) step = 9">Next</b-button> </div> </b-card-body> </b-card-body> </b-collapse> </template> </b-card> </div> <!--PREVIEW AND SUBMIT--> <div v-if="step == 9" class="m-2"> <b-card no-body class="p-3 mb-2"> <strong>You wish to:</strong><br> <div v-if="adsForm.removeExistingYesNo == 'Yes'"> <div v-if="adsForm.removeDirectors.length > 0"> Remove director{{adsForm.removeDirectors.length > 1 ? 's' : ''}}: <ul> <li v-for="(dir, i) in adsForm.removeDirectors" :key="i">{{dir}}</li> </ul> </div> <div v-if="adsForm.removeSupervisors.length > 0"> Remove supervisor{{adsForm.removeSupervisors.length > 1 ? 's' : ''}}: <ul> <li v-for="(sup, i) in adsForm.removeSupervisors" :key="i">{{sup}}</li> </ul> </div> <hr> </div> <div v-if="adsForm.addDirectorYesNo == 'Yes'"> Add director{{adsForm.newDirectors.length > 1 ? 's' : ''}}: <ul> <li v-for="(dir, i) in adsForm.newDirectors" :key="i">{{dir.givenName1.toUpperCase()}} {{dir.surname.toUpperCase()}}</li> </ul> <template v-if="adsForm.licClassCode != 'LHS'"> <div>Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth? <strong>{{adsForm.directorsSuspendedYesNo}}</strong></div> <div v-if="adsForm.directorsSuspendedYesNo" class="mb-3"><em>{{adsForm.directorsSuspendedDetails}}</em></div> <div>Are any of the new directors currently an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors? <strong>{{adsForm.directorsInsolventYesNo}}</strong></div> <div v-if="adsForm.directorsInsolventYesNo" class="mb-3"><em>{{adsForm.directorsInsolventDetails}}</em></div> <div>Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up? <strong>{{adsForm.directorsWoundUpYesNo}}</strong></div> <div v-if="adsForm.directorsWoundUpYesNo" class="mb-3"><em>{{adsForm.directorsWoundUpDetails}}</em></div> <div>Have any of the new directors ever been convicted of any offences or are any court proceedings pending? <strong>{{adsForm.directorsConvictedYesNo}}</strong></div> <div v-if="adsForm.directorsConvictedYesNo" class="mb-3"><em>{{adsForm.directorsConvictedDetails}}</em></div> </template> <template v-else> <div>Have any of the new directors had an application for a Labour Hire licence refused in the previous 12 months? <strong>{{adsForm.directorsLhsRefusedYesNo}}</strong></div> <div v-if="adsForm.directorsLhsRefusedYesNo" class="mb-3"><em>{{adsForm.directorsLhsRefusedDetails}}</em></div> <div>Have any of the new directors had a Labour Hire licence cancelled under section 23 of Labour Hire Licensing Act 2017 in the last two years? <strong>{{adsForm.directorsLhsCancelledYesNo}}</strong></div> <div v-if="adsForm.directorsLhsCancelledYesNo" class="mb-3"><em>{{adsForm.directorsLhsCancelledDetails}}</em></div> <div>Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth? <strong>{{adsForm.directorsLhsSuspendedYesNo}}</strong></div> <div v-if="adsForm.directorsLhsSuspendedYesNo" class="mb-3"><em>{{adsForm.directorsLhsSuspendedDetails}}</em></div> <div>Have any of the new directors ever been an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors? <strong>{{adsForm.directorsLhsInsolventYesNo}}</strong></div> <div v-if="adsForm.directorsLhsInsolventYesNo" class="mb-3"><em>{{adsForm.directorsLhsInsolventDetails}}</em></div> <div>Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up? <strong>{{adsForm.directorsLhsWoundUpYesNo}}</strong></div> <div v-if="adsForm.directorsLhsWoundUpYesNo" class="mb-3"><em>{{adsForm.directorsLhsWoundUpDetails}}</em></div> <div>Are any of the new directors members of, or a participant in, a prescribed organisation? <strong>{{adsForm.directorsLhsPrescribedYesNo}}</strong></div> <div v-if="adsForm.directorsLhsPrescribedYesNo" class="mb-3"><em>{{adsForm.directorsLhsPrescribedDetails}}</em></div> <div>Are any of the new directors close associates of a person who is a member of a prescribed organisation or is subject to a control order under the Serious and Organised Crime (Control) Act 2008? <strong>{{adsForm.directorsLhsAssociatesYesNo}}</strong></div> <div v-if="adsForm.directorsLhsAssociatesYesNo" class="mb-3"><em>{{adsForm.directorsLhsAssociatesDetails}}</em></div> </template> <template v-if="adsForm.licClassCode != 'ISL'"> <div>Do any of the following situations apply to any of the directors?<ul><li v-for="(li, i) in adsForm.directorsNpcList" :key="i">{{li}}</li></ul> <strong>{{adsForm.directorsNpcYesNo}}</strong></div> <div v-if="adsForm.directorsConvictedYesNo"><em>{{adsForm.directorsNpcDetails}}</em></div> </template> <hr> </div> <div v-if="adsForm.addSupervisorYesNo == 'Yes'"> Add supervisor{{adsForm.newSupervisors.length > 1 ? 's' : ''}}: <ul> <li v-for="(sup, i) in adsForm.newSupervisors" :key="i"> <span v-if="sup.type == 'Existing'">{{sup.licensee}} ({{sup.licClassCode}} {{sup.licNum}})</span> <span v-else> {{sup.givenName1.toUpperCase()}} {{sup.surname.toUpperCase()}} <span v-if="sup.type == 'Architect'">({{sup.regNo}})</span> </span> </li> </ul> <hr> </div> <div v-if="adsForm.addManagerYesNo == 'Yes'"> Add manager{{adsForm.newManagers.length > 1 ? 's' : ''}}: <ul> <li v-for="(mgr, i) in adsForm.newManagers" :key="i"> <span v-if="mgr.type == 'Existing'">{{mgr.licensee}} ({{mgr.licClassCode}} {{mgr.licNum}})</span> <span v-else> {{mgr.givenName1.toUpperCase()}} {{mgr.surname.toUpperCase()}} <span v-if="mgr.type == 'AMR'">(AMR licensee)</span> </span> </li> </ul> <hr> </div> <b-alert v-if="adsForm.removeExistingYesNo == 'Yes' && adsForm.removeSupervisors.length == response.Supervisors.length && adsForm.addSupervisorYesNo == 'No'" show variant="danger"> Please note that If you don't have an approved supervisor or architect for a period exceeding 28 days your licence will be suspended until such time that a supervisor has been approved. </b-alert> <strong>Your details:</strong> <div> <i class="far fa-envelope"></i> {{adsForm.emailAddress}} </div> <div> <i class="fas fa-mobile-alt"></i>&nbsp; {{adsForm.mobileNumber}} </div> </b-card> <div class="text-center"> <b-button variant="outline-primary" @click="step = 3">Back</b-button> <b-button variant="primary" @click="submitForm"><b-spinner v-if="isSubmitting" small class="mx-2"></b-spinner><span v-else>Submit</span></b-button> </div> </div> <b-alert :show="isError" variant="danger" class="m-2 text-center">{{errorMsg}}</b-alert> <b-alert :show="isSuccess" variant="success" class="m-2" v-html="successMsg"></b-alert> </b-col> </b-row> </div> <script> const app = new Vue({ el: "#app", components: { vSelect: window.VueSelect.default }, data: { step: 1, accordionVisible: [true, false, false, false], licClassCodes: [ {value: null, text: 'Select From List'}, {value: 'BLD', text: 'BUILDERS'}, {value: 'RCO', text: 'CONVEYANCERS'}, {value: 'RHP', text: 'DESIGNATED ROOMING HOUSE PROPRIETORS'}, {value: 'LHS', text: 'LABOUR HIRE'}, {value: 'RLA', text: 'LAND AGENTS'}, {value: 'PGE', text: 'PLUMBERS, GAS FITTERS AND ELECTRICIANS'}, {value: 'MVD', text: 'SECOND-HAND MOTOR VEHICLE DEALERS'}, {value: 'ISL', text: 'SECURITY AND INVESTIGATION AGENTS'} ], searchForm: { licClassCode: null, licNum: null, clientID: null }, isSearching: false, isError: false, isSuccess: false, successMsg: '', errorMsg: '', responseDefault: {}, response: { LicClassCode: null, LicNum: null, LicenceStatus: null, Licensee: null, ACN: null, Directors: [], Supervisors: [], }, adsFormDefault: {}, adsForm: { licClassCode: null, licNum: null, clientID: null, licensee: null, acn: null, directorsSupervisorsManagers: null, removeExistingYesNo: null, removeDirectors: [], removeSupervisors: [], removeManagers: [], addDirectorYesNo: null, newDirectors: [{ title: 'Mr', givenName1: '', givenName2: '', givenName3: '', surname: '', birthDate: '', gender: 'M', phoneNumber: '', resid: { Country: 'AUSTRALIA', HouseNumber: '', IsPoBox: 'off', LevelNumber: '', Locality: '', PoBoxDetails: '', Postcode: '', Search: '', State: '', StreetName: '', StreetType: '', UnitNumber: '' }, serv: { Country: 'AUSTRALIA', HouseNumber: '', IsPoBox: 'off', LevelNumber: '', Locality: '', PoBoxDetails: '', Postcode: '', Search: '', State: '', StreetName: '', StreetType: '', UnitNumber: '' } }], directorsSuspendedYesNo: null, directorsSuspendedDetails: '', directorsInsolventYesNo: null, directorsInsolventDetails: '', directorsWoundUpYesNo: null, directorsWoundUpDetails: '', directorsConvictedYesNo: null, directorsConvictedDetails: '', directorsLhsRefusedYesNo: null, directorsLhsRefusedDetails: '', directorsLhsCancelledYesNo: null, directorsLhsCancelledDetails: '', directorsLhsSuspendedYesNo: null, directorsLhsSuspendedDetails: '', directorsLhsInsolventYesNo: null, directorsLhsInsolventDetails: '', directorsLhsWoundUpYesNo: null, directorsLhsWoundUpDetails: '', directorsLhsPrescribedYesNo: null, directorsLhsPrescribedDetails: '', directorsLhsAssociatesYesNo: null, directorsLhsAssociatesDetails: '', directorsNpcYesNo: null, directorsNpcDetails: '', directorsNpcList: [], addSupervisorYesNo: null, newSupervisors: [{ type: null, licClassCode: 'BLD', licNum: '', licensee: '', errorMsg: null, regNo: '', title: 'Mr', givenName1: '', givenName2: '', givenName3: '', surname: '', birthDate: '', gender: 'M', phoneNumber: '', }], addManagerYesNo: null, newManagers: [{ type: null, licClassCode: '', licNum: '', licensee: '', errorMsg: null, title: 'Mr', givenName1: '', givenName2: '', givenName3: '', surname: '', birthDate: '', gender: 'M', phoneNumber: '', branch: { Country: 'AUSTRALIA', HouseNumber: '', IsPoBox: 'off', LevelNumber: '', Locality: '', PoBoxDetails: '', Postcode: '', Search: '', State: '', StreetName: '', StreetType: '', UnitNumber: '' } }], emailAddress: '', mobileNumber: '' }, directorDefault: {}, supervisorDefault: {}, managerDefault: {}, isChecking: false, states: [ {value: 'ACT', text: 'Australian Capital Territory'}, {value: 'NSW', text: 'New South Wales'}, {value: 'NT', text: 'Northern Territory'}, {value: 'QLD', text: 'Queensland'}, {value: 'SA', text: 'South Australia'}, {value: 'TAS', text: 'Tasmania'}, {value: 'VIC', text: 'Victoria'}, {value: 'WA', text: 'Western Australia'} ], addressCandidates: [], isSubmitting: false }, computed: { directorsSupervisorsManagers: function () { if (this.adsForm.directorsSupervisorsManagers == 'D') return 'directors' else if (this.adsForm.directorsSupervisorsManagers == 'S') return 'supervisors' else return 'managers' }, licenceClassLong: function () { if (this.adsForm.licClassCode == 'ISL') return 'security / investigation agent licence' else if (this.adsForm.licClassCode == 'MVD') return 'second hand vehicle dealers licence' else if (this.adsForm.licClassCode == 'RLA') return 'land agents or sales representative registration' else return ''; }, mgrLicClassCodes: function () { if (this.adsForm.licClassCode == 'ISL') return ['ISL'] else if (this.adsForm.licClassCode == 'MVD') return ['MVD'] else if (this.adsForm.licClassCode == 'RLA') return ['RLA','RSR'] else return [] } }, methods: { getLicenceDetails() { if (!this.searchForm.licClassCode || !this.searchForm.licNum || !this.searchForm.clientID) { this.isError = true; this.errorMsg = 'Please select a licence type, and enter a licence/registration number and a client ID.'; return false; } this.step = 1; this.isSearching = true; this.isError = false; this.isSuccess = false; this.accordionVisible = [true, false, false, false]; this.adsForm = JSON.parse(JSON.stringify(this.adsFormDefault)); this.response = JSON.parse(JSON.stringify(this.responseDefault)); axios.get("add_director_supervisor.php?function=GetLicenceDetails&LicenceOwnerType=CO&LicClassCode="+this.searchForm.licClassCode+"&LicNum="+this.searchForm.licNum+"&ClientID="+this.searchForm.clientID) .then(response => { this.isSearching = false; if ('error' in response.data) { this.isError = true; this.errorMsg = response.data.error; return false; } Object.assign (this.response, response.data); this.adsForm.licClassCode = this.searchForm.licClassCode; this.adsForm.licNum = this.searchForm.licNum; this.adsForm.clientID = this.searchForm.clientID; this.adsForm.licensee = this.response.Licensee; this.adsForm.acn = this.response.ACN; if (this.adsForm.licClassCode == 'LHS') {this.adsForm.directorsNpcList = ["They are a director of a company listed on the Australian Stock Exchange","The director has lodged an NPC with Consumer & Business Services within the previous 12 months","The director is an overseas resident who has never resided in Australia","The director holds or is associated with another licence issued under the same Act for which an NPC has already been supplied","The director has held a licence within the last year and is applying for an equivalent licence"]} else {this.adsForm.directorsNpcList = ["They are a director of a company listed on the Australian Stock Exchange","The licence holder is a body established by statute (e.g. a council or Government authority)","The director has lodged an NPC with Consumer & Business Services within the previous 12 months","The director is an overseas resident who has never resided in Australia","The director holds or is associated with another licence issued under the same Act for which an NPC has already been supplied","The director has held a licence within the last year and is applying for an equivalent licence"]} if (['BLD','ISL','MVD','RLA'].indexOf(this.response.LicClassCode) > -1) { this.adsForm.newManagers[0].licClassCode = this.adsForm.licClassCode; this.step = 2; } else { this.adsForm.directorsSupervisorsManagers = 'D'; this.step = 3; } }); }, openNextAccordion(currentAccordion) { let nextAccordion = 'accordion-remove-existing'; if (currentAccordion == 'accordion-remove-existing') { if (this.adsForm.directorsSupervisorsManagers == 'D') nextAccordion = 'accordion-add-director'; else if (this.adsForm.directorsSupervisorsManagers == 'S') nextAccordion = 'accordion-add-supervisor'; else nextAccordion = 'accordion-add-manager'; } if (currentAccordion == 'accordion-add-supervisor' || currentAccordion == 'accordion-add-director' || currentAccordion == 'accordion-add-manager') { nextAccordion = 'accordion-contact-details'; } this.$root.$emit('bv::toggle::collapse', nextAccordion); }, onSearch (search, loading) { if (search == '') { this.addressCandidates = []; return; } loading(true); this.searchAddress(search, loading, this); }, searchAddress: _.debounce((search, loading, vm) => { fetchJsonp('https://lsa1.geohub.sa.gov.au/server/rest/services/Locators/SAGAF_PLUS_NATIONAL/GeocodeServer/findAddressCandidates?outFields=UnitType%2C+UnitNumber%2C+HouseNumber%2C+StreetName%2C+StreetType%2C+Locality%2C+Postcode%2C+State&maxLocations=12&&Single+Line+Input='+search+'&f=pjson') .then(response => { return response.json() }).then(json => { vm.addressCandidates = json.candidates; }).catch(ex => { vm.addressCandidates = [{address: 'Address autocomplete is not available. Please enter address manually.'}]; }).finally(fin => { loading(false); }); }, 750), selectAddress(result, addressType, entity, i) { if (result == null) return; let address = result.attributes; this.adsForm[entity][i][addressType].UnitNumber = address.UnitNumber; this.adsForm[entity][i][addressType].HouseNumber = address.HouseNumber; this.adsForm[entity][i][addressType].StreetName = address.StreetName; this.adsForm[entity][i][addressType].StreetType = address.StreetType; this.adsForm[entity][i][addressType].Locality = address.Locality; this.adsForm[entity][i][addressType].Postcode = address.Postcode; this.adsForm[entity][i][addressType].State = this.states.find(x => x.text.toUpperCase() == address.State.toUpperCase()).value; }, cloneAddress(entity, i) { this.adsForm[entity][i].serv = JSON.parse(JSON.stringify(this.adsForm[entity][i].resid)); }, formatPoBox(entity, i) { if (!!parseInt(this.adsForm[entity][i].serv.PoBoxDetails)) { this.adsForm[entity][i].serv.PoBoxDetails = 'PO Box ' + this.adsForm[entity][i].serv.PoBoxDetails; } }, addAnotherDirector() { this.adsForm.newDirectors.push(JSON.parse(JSON.stringify(this.directorDefault))); }, deleteDirector(i) { this.adsForm.newDirectors.splice(i, 1); }, addAnotherSupervisor() { this.adsForm.newSupervisors.push(JSON.parse(JSON.stringify(this.supervisorDefault))); }, deleteSupervisor(i) { this.adsForm.newSupervisors.splice(i, 1); }, addAnotherManager() { this.managerDefault.licClassCode = this.adsForm.licClassCode; this.adsForm.newManagers.push(JSON.parse(JSON.stringify(this.managerDefault))); }, deleteManager(i) { this.adsForm.newManagers.splice(i, 1); }, checkLicence(ap) { if (ap.licNum.length == 0) return false; this.isChecking = true; ap.licensee = ''; ap.errorMsg = null; axios.get("add_director_supervisor.php?function=GetLicenceDetails&LicenceOwnerType=P&LicClassCode="+ap.licClassCode+"&LicNum="+ap.licNum) .then(response => { this.isChecking = false; if ('error' in response.data) { ap.errorMsg = response.data.error; return false; } ap.licensee = response.data.Licensee; }); }, validateForm() { reEmail = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; if (reEmail.test(this.adsForm.emailAddress) == false) { this.$bvToast.toast('Your email is missing or invalid', {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); return false; } if (this.adsForm.mobileNumber.length == 0) { this.$bvToast.toast('Your phone number is missing', {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); return false; } if (this.adsForm.removeExistingYesNo != 'Yes' && this.adsForm.addDirectorYesNo != 'Yes' && this.adsForm.addSupervisorYesNo != 'Yes' && this.adsForm.addManagerYesNo != 'Yes') { this.$bvToast.toast('You are not adding or removing any '+this.directorsSupervisorsManagers, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion(); return false; } if (this.adsForm.removeExistingYesNo == 'Yes' && this.adsForm.removeDirectors.length == 0 && this.adsForm.removeSupervisors.length == 0 && this.adsForm.removeManagers.length == 0) { this.$bvToast.toast('You are not removing any existing '+this.directorsSupervisorsManagers, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion(); return false; } if (this.adsForm.removeExistingYesNo == 'Yes' && this.adsForm.addDirectorYesNo == null && this.adsForm.addSupervisorYesNo == null && this.adsForm.addManagerYesNo == null) { this.$bvToast.toast('You need to answer whether you wish to add any '+this.directorsSupervisorsManagers, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion('accordion-remove-existing'); return false; } if (this.adsForm.addDirectorYesNo == 'Yes') { let pass = true; this.adsForm.newDirectors.forEach((dir, i) => { let errors = []; let h = this.$createElement; let errorsDir = this.validateIndividual(dir, 'Director '+(i+1), errors, h); let errorsRes = this.validateResidentialAddress(dir, 'Director '+(i+1), errors, h); let errorsServ = this.validateServiceAddress(dir, 'Director '+(i+1), errors, h); if (errors.length > 0) { this.$bvToast.toast(errors, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: (errorsDir.length+errorsRes.length+errorsServ.length) < 3 ? 3000 : (errorsDir.length+errorsRes.length+errorsServ.length)*1000}) this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } }) if (pass == false) return pass; if (this.adsForm.licClassCode != 'LHS') { if (!this.adsForm.directorsSuspendedYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsSuspendedYesNo == 'Yes' && this.adsForm.directorsSuspendedDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsInsolventYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Are any of the new directors currently an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsInsolventYesNo == 'Yes' && this.adsForm.directorsInsolventDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Are any of the new directors currently an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsWoundUpYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsWoundUpYesNo == 'Yes' && this.adsForm.directorsWoundUpDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsConvictedYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors ever been convicted of any offences or are any court proceedings pending?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsConvictedYesNo == 'Yes' && this.adsForm.directorsConvictedDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors ever been convicted of any offences or are any court proceedings pending?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } } else { if (!this.adsForm.directorsLhsRefusedYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors had an application for a Labour Hire licence refused in the previous 12 months?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsRefusedYesNo == 'Yes' && this.adsForm.directorsLhsRefusedDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors had an application for a Labour Hire licence refused in the previous 12 months?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsCancelledYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors had a Labour Hire licence cancelled under section 23 of Labour Hire Licensing Act 2017 in the last two years?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsCancelledYesNo == 'Yes' && this.adsForm.directorsLhsCancelledDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors had a Labour Hire licence cancelled under section 23 of Labour Hire Licensing Act 2017 in the last two years?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsSuspendedYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsSuspendedYesNo == 'Yes' && this.adsForm.directorsLhsSuspendedDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Are any of the new directors suspended or disqualified from practising or carrying on an occupation, trade or business under a law of this State or another State or Territory of the Commonwealth?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsInsolventYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors ever been an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsInsolventYesNo == 'Yes' && this.adsForm.directorsLhsInsolventDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors ever been an insolvent under administration within the meaning of the Corporations Act 2001 (Cth) or subject to a composition or deed or scheme of arrangement with or for the benefit of creditors?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsWoundUpYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsWoundUpYesNo == 'Yes' && this.adsForm.directorsLhsWoundUpDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Have any of the new directors, within the last 5 years, been a director of a body corporate that was wound up for the benefit of creditors, either when it commenced winding up or within 12 months prior to the winding up?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsPrescribedYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Are any of the new directors members of, or a participant in, a prescribed organisation?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsPrescribedYesNo == 'Yes' && this.adsForm.directorsLhsPrescribedDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Are any of the new directors members of, or a participant in, a prescribed organisation?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } if (!this.adsForm.directorsLhsAssociatesYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Are any of the new directors close associates of a person who is a member of a prescribed organisation or is subject to a control order under the Serious and Organised Crime (Control) Act 2008?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsLhsAssociatesYesNo == 'Yes' && this.adsForm.directorsLhsAssociatesDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Are any of the new directors close associates of a person who is a member of a prescribed organisation or is subject to a control order under the Serious and Organised Crime (Control) Act 2008?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } } if (this.adsForm.licClassCode != 'ISL') { if (!this.adsForm.directorsNpcYesNo) { this.$bvToast.toast("You need to answer Yes or No to 'Do any of the following situations apply to any of the directors?'", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } else if (this.adsForm.directorsNpcYesNo == 'Yes' && this.adsForm.directorsNpcDetails.length == 0) { this.$bvToast.toast("You answered Yes to 'Do any of the following situations apply to any of the directors?' but didn't provide any details.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 5000}) this.openNextAccordion('accordion-remove-existing'); return false; } } } if (this.adsForm.addSupervisorYesNo == 'Yes') { let pass = true; this.adsForm.newSupervisors.forEach((sup, i) => { let errors = []; let h = this.$createElement; if (!sup.type) { this.$bvToast.toast('You need to select whether supervisor '+(i+1)+' holds a licence, has recently applied for one, or is a registered architect.', {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } else if (sup.type == 'Existing') { if (sup.errorMsg) { this.$bvToast.toast("Supervisor "+(i+1)+"'s licence is invalid. "+sup.errorMsg, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); pass = false; return false; } else if (sup.licNum.length == 0 || isNaN(sup.licNum) || sup.licensee.length == 0) { this.$bvToast.toast("You need to enter supervisor "+(i+1)+"'s licence number and click Check.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } } else { let errorsSup = this.validateIndividual(sup, 'Supervisor '+(i+1), errors, h); if (errors.length > 0) { this.$bvToast.toast(errors, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: (errorsSup.length) < 3 ? 3000 : (errorsSup.length)*1000}) this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } } }) return pass; } if (this.adsForm.addManagerYesNo == 'Yes') { let pass = true; this.adsForm.newManagers.forEach((mgr, i) => { let errors = []; let h = this.$createElement; if (!mgr.type) { this.$bvToast.toast('You need to select whether manager '+(i+1)+' holds a licence or has recently applied for one.', {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } else if (mgr.type == 'Existing') { if (mgr.errorMsg) { this.$bvToast.toast("Manager "+(i+1)+"'s licence is invalid. "+mgr.errorMsg, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); pass = false; return false; } else if (mgr.licNum.length == 0 || isNaN(mgr.licNum) || mgr.licensee.length == 0) { this.$bvToast.toast("You need to enter manager "+(i+1)+"'s licence number and click Check.", {title: 'Unable to proceed', variant: 'danger', autoHideDelay: 3000}); this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } } else { let errorsMgr = this.validateIndividual(mgr, 'Manager '+(i+1), errors, h); if (errors.length > 0) { this.$bvToast.toast(errors, {title: 'Unable to proceed', variant: 'danger', autoHideDelay: (errorsMgr.length) < 3 ? 3000 : (errorsMgr.length)*1000}) this.openNextAccordion('accordion-remove-existing'); pass = false; return false; } } }) return pass; } return true; }, validateIndividual(entity, title, errors, h) { let errorsIndiv = []; if (entity.type == 'Architect' && entity.regNo.length == 0) errorsIndiv.push(h('li', 'Registration number')) else if (entity.type == 'Architect' && isNaN(entity.regNo)) errorsIndiv.push(h('li', 'Registration number can only have numbers')) if (entity.givenName1 == '') errorsIndiv.push(h('li', 'Given names')) if (entity.surname == '') errorsIndiv.push(h('li', 'Surname')) if (entity.birthDate == '') errorsIndiv.push(h('li', 'Date of birth')) if (entity.phoneNumber == '') errorsIndiv.push(h('li', 'Phone number')) if (errorsIndiv.length > 0) { errors.push(h('div', 'Following mandatory fields in the '+title+' section are missing:')); errors.push(h('ul', errorsIndiv)); } return errorsIndiv; }, validateResidentialAddress(entity, title, errors, h) { let errorsRes = []; if (entity.resid.HouseNumber == '') {errorsRes.push(h('li', 'Street number'));} if (entity.resid.StreetName == '') {errorsRes.push(h('li', 'Street name'));} if (entity.resid.Locality == '') {errorsRes.push(h('li', 'Suburb'));} if (entity.resid.Postcode == '') {errorsRes.push(h('li', 'Postcode'));} if (entity.resid.State == '') {errorsRes.push(h('li', 'State'));} if (entity.resid.Country == '') {errorsRes.push(h('li', 'Country'));} if (errorsRes.length > 0) { errors.push(h('div', 'Following mandatory fields in the '+title+' "Residential address" section are missing:')); errors.push(h('ul', errorsRes)); } return errorsRes; }, validateServiceAddress(entity, title, errors, h) { let errorsServ = []; if (entity.serv.IsPoBox == 'on') { if (entity.serv.PoBoxDetails == '') {errorsServ.push(h('li', 'PO Box Details'));} } else { if (entity.serv.HouseNumber == '') {errorsServ.push(h('li', 'Street number'));} if (entity.serv.StreetName == '') {errorsServ.push(h('li', 'Street name'));} } if (entity.serv.Locality == '') {errorsServ.push(h('li', 'Suburb'));} if (entity.serv.Postcode == '') {errorsServ.push(h('li', 'Postcode'));} if (entity.serv.State == '') {errorsServ.push(h('li', 'State'));} if (entity.serv.Country == '') {errorsServ.push(h('li', 'Country'));} if (errorsServ.length > 0) { errors.push(h('div', 'Following mandatory fields in the '+title+' "Service (postal) address" section are missing:')); errors.push(h('ul', errorsServ)); } return errorsServ; }, submitForm() { this.isSubmitting = true; axios.post('add_director_supervisor.php?submit', this.adsForm) .then(response => { if (response.data.token) window.open('../ELAF/MISC/retrieve_ALL.php?token='+response.data.token, '_self'); else if (response.data.success) { this.isSubmitting = false; this.step = 1; this.isSuccess = true; this.successMsg = 'Your request'+(this.adsForm.directorsSupervisorsManagers == 'M' ? '' : ' to remove '+this.directorsSupervisorsManagers)+' has been submitted.'; } }) } }, mounted () { document.getElementById('app').style.display = 'block'; this.adsFormDefault = JSON.parse(JSON.stringify(this.adsForm)); this.responseDefault = JSON.parse(JSON.stringify(this.response)); this.directorDefault = JSON.parse(JSON.stringify(this.adsForm.newDirectors[0])); this.supervisorDefault = JSON.parse(JSON.stringify(this.adsForm.newSupervisors[0])); this.managerDefault = JSON.parse(JSON.stringify(this.adsForm.newManagers[0])); } }); </script> <script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=1&cb=1084902617" async></script></body>

Pages: 1 2 3 4 5 6 7 8 9 10