Browse Source

UI-799: now always using current acount timezone for main callflow.

4.3
Maxime Roux 11 years ago
parent
commit
727a9f73ac
3 changed files with 19 additions and 7 deletions
  1. +4
    -0
      submodules/strategy/strategy.css
  2. +10
    -5
      submodules/strategy/strategy.js
  3. +5
    -2
      views/strategy-hours.html

+ 4
- 0
submodules/strategy/strategy.css View File

@ -196,6 +196,10 @@
padding: 15px;
}
#strategy_container .element-container.strategy-hours .custom-hours-header .timezone {
margin-left: 5px;
}
#strategy_container .element-container.strategy-hours .custom-days {
border: solid 1px #ccc;
border-radius: 10px;


+ 10
- 5
submodules/strategy/strategy.js View File

@ -125,7 +125,8 @@ define(function(require){
},
subscribe: {
'voip.strategy.render': 'strategyRender'
'voip.strategy.render': 'strategyRender',
'auth.currentAccountUpdated': '_strategyOnCurrentAccountUpdated'
},
weekdays: ["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],
@ -330,7 +331,7 @@ define(function(require){
weekdaysRules = strategyData.temporalRules.weekdays,
templateData = {
alwaysOpen: true,
companyTimezone: timezone.formatTimezone(strategyData.callflows["MainCallflow"].flow.data.timezone),
companyTimezone: timezone.formatTimezone(strategyData.callflows["MainCallflow"].flow.data.timezone || monster.apps["auth"].currentAccount.timezone),
days: [],
lunchbreak: {
enabled: (strategyData.temporalRules.lunchbreak.id in strategyData.callflows["MainCallflow"].flow.children),
@ -1862,9 +1863,7 @@ define(function(require){
module:"callflow"
}
},
data: {
timezone: monster.apps["auth"].currentAccount.timezone
},
data: {},
module: "temporal_route"
}
}
@ -1878,6 +1877,7 @@ define(function(require){
}
});
} else {
delete results["MainCallflow"].flow.data.timezone;
callback(results);
}
});
@ -2378,6 +2378,11 @@ define(function(require){
callback(data.data);
}
});
},
_strategyOnCurrentAccountUpdated: function(accountData) {
var self = this;
$('#strategy_custom_hours_timezone').text(timezone.formatTimezone(accountData.timezone));
}
};


+ 5
- 2
views/strategy-hours.html View File

@ -23,8 +23,11 @@
<div class="custom-hours-div" {{#unless alwaysOpen}}style="display: block;"{{/unless}}>
<div class="custom-hours-header">
<span class="pull-right timezone">{{i18n.strategy.hours.timezone}} {{companyTimezone}}</span>
<span class="title">{{i18n.strategy.hours.listTitle}}</span>
<div class="pull-right timezone-container">
{{i18n.strategy.hours.timezone}}
<span id="strategy_custom_hours_timezone" class="timezone">{{companyTimezone}}</span>
</div>
<div class="title">{{i18n.strategy.hours.listTitle}}</div>
</div>
<div class="custom-days">
{{#each days}}


Loading…
Cancel
Save