Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SSCSCI-449 - Remove webchat opening times feature flag #1474

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions appConfigurations.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ const configureNunjucks = (app, commonContent) => {
urls,
featureToggles: {
welsh: () => process.env.FT_WELSH || config.features.welsh.enabled,
cookieBanner: () => process.env.ALLOW_COOKIE_BANNER_ENABLED || config.features.cookieBanner.enabled,
webchatOpen8to5: () => process.env.WEBCHAT_OPENING_TIME_8_5 || config.features.webchatOpen8to5.enabled}
cookieBanner: () => process.env.ALLOW_COOKIE_BANNER_ENABLED || config.features.cookieBanner.enabled}
}
});
};
Expand Down
4 changes: 0 additions & 4 deletions assets/js/web-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ export class WebChat {
}

isWebchatOpen() {
if (document.webchatOpeningFlag) {
return (currentHour >= OPENING_HOUR && currentHour < CLOSING_HOUR)
} else {
return true
}
}

reset() {
Expand Down
3 changes: 0 additions & 3 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@
},
"cookieBanner": {
"enabled": "ALLOW_COOKIE_BANNER_ENABLED"
},
"webchatOpen8to5" : {
"enabled": "WEBCHAT_OPENING_TIME_8_5"
}
},
"postcodeChecker": {
Expand Down
3 changes: 0 additions & 3 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@
},
"cookieBanner": {
"enabled": "false"
},
"webchatOpen8to5": {
"enabled": "false"
}
},
"postcodeChecker": {
Expand Down
6 changes: 0 additions & 6 deletions views/layouts/two_thirds.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
{% block content -%}
<script>

{% if featureToggles.webchatOpen8to5() == "true" %}
document.webchatOpeningFlag = true;
{% else %}
document.webchatOpeningFlag = false;
{% endif %}

{% if welshWebchatEnabled %}
document.welshWebchatFlag = true;
{% else %}
Expand Down