fix: Do not use the default value if the out of office message is empty (#7268)

This commit is contained in:
Pranav Raj S
2023-06-08 08:22:10 -07:00
committed by GitHub
parent 2f2ae88cba
commit b3b76d00ff
2 changed files with 2 additions and 7 deletions

View File

@@ -535,7 +535,6 @@
"UPDATE": "Update business hours settings",
"TOGGLE_AVAILABILITY": "Enable business availability for this inbox",
"UNAVAILABLE_MESSAGE_LABEL": "Unavailable message for visitors",
"UNAVAILABLE_MESSAGE_DEFAULT": "We are unavailable at the moment. Leave a message we will respond once we are back.",
"TOGGLE_HELP": "Enabling business availability will show the available hours on live chat widget even if all the agents are offline. Outside available hours vistors can be warned with a message and a pre-chat form.",
"DAY": {
"ENABLE": "Enable availability for this day",

View File

@@ -102,9 +102,7 @@ export default {
data() {
return {
isBusinessHoursEnabled: false,
unavailableMessage: this.$t(
'INBOX_MGMT.BUSINESS_HOURS.UNAVAILABLE_MESSAGE_DEFAULT'
),
unavailableMessage: '',
timeZone: DEFAULT_TIMEZONE,
dayNames: {
0: 'Sunday',
@@ -157,9 +155,7 @@ export default {
? timeSlotParse(timeSlots)
: defaultTimeSlot;
this.isBusinessHoursEnabled = isEnabled;
this.unavailableMessage =
unavailableMessage ||
this.$t('INBOX_MGMT.BUSINESS_HOURS.UNAVAILABLE_MESSAGE_DEFAULT');
this.unavailableMessage = unavailableMessage || '';
this.timeSlots = slots;
this.timeZone =
this.timeZones.find(item => timeZone === item.value) ||