Updated blacklane, chubb and anthology's templates. Some small script updates. Todos.
This commit is contained in:
@ -1,13 +1,28 @@
|
||||
<script>
|
||||
let jsDate = new Date();
|
||||
let jsFormattedDate = jsDate.getFullYear() + ("0" + (jsDate.getMonth() + 1)).slice(-2) + ("0" + jsDate.getDate()).slice(-2);
|
||||
let liquidFormattedDate = '{{ "now" | date: "%Y-%m-%d" }}';
|
||||
let personCreateDate = '{{ current_person.created_at }}'.split(" ")[0]
|
||||
if (personCreateDate == liquidFormattedDate) {
|
||||
if (localStorage.getItem('learnerCompletedAdditionalInfo') == null) {
|
||||
window.location.href = '/app/sign-up-follow-up'
|
||||
}
|
||||
}
|
||||
{% assign groups = "24109c21-3801-4f71-90a0-43e90de4ab3a, ef141d93-8556-478a-81a2-0da18c8390ec, 28cb22cf-6ac0-4f6c-852d-7ad77ab046cb" | split: ", " %}
|
||||
let groupedUser = false;
|
||||
{% if current_person.groups.any? %}
|
||||
{% for group in current_person.groups %}
|
||||
{% for gid in groups %}
|
||||
{% if group.id == gid %}
|
||||
groupedUser = true;
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if groupedUser == false %}
|
||||
window.location.href = '/app/sign-up-follow-up'
|
||||
{% endif %}
|
||||
// let jsDate = new Date();
|
||||
// let jsFormattedDate = jsDate.getFullYear() + ("0" + (jsDate.getMonth() + 1)).slice(-2) + ("0" + jsDate.getDate()).slice(-2);
|
||||
// let liquidFormattedDate = '{{ "now" | date: "%Y-%m-%d" }}';
|
||||
// let personCreateDate = '{{ current_person.created_at }}'.split(" ")[0]
|
||||
// if (personCreateDate == liquidFormattedDate) {
|
||||
// if (localStorage.getItem('learnerCompletedAdditionalInfo') == null) {
|
||||
// window.location.href = '/app/sign-up-follow-up'
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<header class="np-header np-header-color">
|
||||
|
||||
Reference in New Issue
Block a user