updateFormSaveDisallowed = (disallowed) => {
if (!!disallowed != !!formSaveDisallowed){
$db('shirah').write('form-save-disallowed', (formSaveDisallowed = !!disallowed)).then(() => loadData());
}
};
loadData = () => {
$db('shirah').read('form-fields').then((fields) => {
fields && Object.keys(fields).filter(key => !data[key]).forEach(key => (data[key] = (fields[key] || '')));
});
};
saveData = () => {
if (formSaveDisallowed){
return;
}
const blacklist = ['form_id', 'transaction_id', 'transaction_uid', 'price', 'schedule_url'];
let validData = {};
Object.keys(data).filter(key => (data[key] && !blacklist.includes(key))).forEach(key => (validData[key] = data[key]));
$db('shirah').write('form-fields', validData);
};
nextPage = () => {
if (!invalid && $rel.lt(page, pages)){
page += 1;
delta = 1;
saveData();
}
else if (!invalid){
saveData();
$component('submission-notice').enter(data);
}
}
data.name = '';
data.phone = '';
$db('shirah').read('form-save-disallowed').then((disallowed) => {
!(formSaveDisallowed = !!disallowed) && loadData();
});
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Contact Information
What is your
email?
let input = this.nextElementSibling;
if (!$scope.entered){
$scope.entered = true;
input.setAttribute('x-model', '$scope.email');
$$class(input).remove('w-full');
$$class(input).add('flex-grow');
$$class(this.parentElement).add('flex', 'flex-row', 'justify-start', 'items-center');
let outerDiv = document.createElement('div');
outerDiv.style.padding = '0.25rem';
$$class(outerDiv).add('ml-2', 'bg-themed-4', 'loader');
outerDiv.setAttribute('x-show', '$scope.email_checking');
outerDiv.setAttribute('x-cloak', '');
let innerDiv = document.createElement('div');
innerDiv.style.width = '1rem';
innerDiv.style.height = '1rem';
$$class(innerDiv).add('bg-transparent');
outerDiv.appendChild(innerDiv);
this.parentElement.appendChild(outerDiv);
}
$static(data).email = '';
let email = $scope.email, checkpoint = ($locals.checkpoint ? ++$locals.checkpoint : ($locals.checkpoint = 1)), scope = $scope;
if (email && input.validity.valid){
$scope.email_checking = true;
$get(`/emails/${email}/${id}`, true).then((res) => {
if (checkpoint == $$locals(this).checkpoint){
scope.email_checking = false;
if (res.ok){
Object.entries(res.data || {}).forEach(([key, value]) => (data[key] = value));
data.email = email;
scope.isInvalid = false;
}
else{
scope.isInvalid = true;
$alert.notify({
type: 'error',
message: res.message,
toast: true,
});
$router.goto(res.url);
}
}
});
}
else{
$scope.email_checking = false;
}
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
Country of
citizenship?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Contact Information
Country of
residence?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
What is your
gender?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
What is your
marital
status?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
Do you have any
children?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Business Profile
What is your
current business activity
and for
how long?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Business Profile
Do you have any
current or past
involvement with a
startup business?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Visa Details
Have you ever applied for a
Startup Visa
in Canada or any other country?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Business Profile
Do you have any experience working with
venture capital, angel investors, accelerators/incubators?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
Indicate
proof of funds
if (!$scope.entered){
$scope.entered = true;
let incremental = 3586, list = [13310, 16570, 20371, 24733, 28052];
Array.from({ length: 10 }).forEach(() => {
list.push(list[list.length - 1] + incremental);
});
$scope.listTexts = list.map((item, index) => `\$${$format.comma(item)} for ${index + 1} person${$rel.gt(index, 0) ? 's' : ''}`);
}
let index = ((data.marital_status && data.marital_status.toLowerCase() === 'married') ? 1 : 0) + (data.children_count ?
data.children_count.replace(/\s/g, '').replace(/\,{2,}/g,
',').replace(/^\,+|\,+$/g, '').split(',').length : 0);
data.proof_of_funds = ($rel.lt(index, $scope.listTexts.length) ?
$scope.listTexts[index] : $scope.listTexts[$scope.listTexts.length - 1]);
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
Have you, your spouse, or dependent children ever been convicted of a
criminal offence?
What is
nature
of the offence?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Medical Profile
Do you or your family you want to immigrate with have any
medical problems?
Please provide more
details
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Visa Details
Have you or your spouse been previously
denied a canadian visa
upon application?
What
visa
did you apply for?
What were the
reasons
of denial?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
How did you
hear about us?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
Leave any additional
comments
you have
Data entered into this form {{ formSaveDisallowed ? 'are not' : 'are' }} being saved on this device.