v.2.3
front fix
This commit is contained in:
@@ -105,6 +105,7 @@ class TopDishesNewYear extends HRCCommand implements HRCCommandInterface {
|
|||||||
'count' => $count,
|
'count' => $count,
|
||||||
'dishes' => $sorted,
|
'dishes' => $sorted,
|
||||||
'top_shift' => $shift_counter_sorted,
|
'top_shift' => $shift_counter_sorted,
|
||||||
|
'in_file' => 1,
|
||||||
];
|
];
|
||||||
$handle = fopen($dirname . $filename, 'w+');
|
$handle = fopen($dirname . $filename, 'w+');
|
||||||
fputs($handle, json_encode($data));
|
fputs($handle, json_encode($data));
|
||||||
|
|||||||
@@ -25,42 +25,41 @@
|
|||||||
function DashboardCtrl($scope, smartRequest, $interval, $location) {
|
function DashboardCtrl($scope, smartRequest, $interval, $location) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if (moment(moment().format('YYYY-MM-DD')).isAfter('2021-12-25')) {
|
if (moment(moment().format('YYYY-MM-DD')).isAfter('2021-12-25')) {
|
||||||
console.log('moment_first_true');
|
|
||||||
if (moment(moment().format('YYYY-MM-DD')).isBefore('2022-01-10')) {
|
if (moment(moment().format('YYYY-MM-DD')).isBefore('2022-01-10')) {
|
||||||
console.log('moment_second_true');
|
|
||||||
var delayMs = 1500; // delay in milliseconds
|
|
||||||
console.log('delay_true');
|
|
||||||
setTimeout(function(){
|
|
||||||
$('#get-more-newyear').modal('show');
|
|
||||||
}, delayMs);
|
|
||||||
console.log('modal_true');
|
|
||||||
if ($( window ).width() < 700) {
|
|
||||||
$('#get-more-newyear').on('show.bs.modal', function () {
|
|
||||||
$('.modal-dialog').css('margin',0);
|
|
||||||
$('.modal-content').css('height',$( window ).height()*0.95);
|
|
||||||
$('.modal-content').css('width',$( window ).width());
|
|
||||||
$('.myCarousel').css('height', $( window ).height()*0.95);
|
|
||||||
$('.myCarousel').css('width', 'auto');
|
|
||||||
$('.myCarousel').css('object-fit', 'cover');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$('#get-more-newyear').on('show.bs.modal', function () {
|
|
||||||
$('.modal-dialog').css('margin-right',$( window ).width()/4);
|
|
||||||
$('.modal-dialog').css('margin-left',$( window ).width()/4);
|
|
||||||
$('.modal-dialog').css('margin-top',$( window ).height()/8);
|
|
||||||
$('.modal-content').css('height',$( window ).height()*0.7);
|
|
||||||
$('.modal-content').css('width',$( window ).width()*0.5);
|
|
||||||
$('.myCarousel').css('height', $( window ).height()*0.7);
|
|
||||||
$('.myCarousel').css('width', 'auto');
|
|
||||||
$('.myCarousel').css('object-fit', 'cover');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
smartRequest.get('v1/topdishesnewyear', function (data) {
|
smartRequest.get('v1/topdishesnewyear', function (data) {
|
||||||
$scope.year_count = data.count;
|
$scope.year_count = data.count;
|
||||||
$scope.top_dishes = data.dishes;
|
$scope.top_dishes = data.dishes;
|
||||||
$scope.top_shifts = data.top_shift;
|
$scope.top_shifts = data.top_shift;
|
||||||
|
$scope.in_file = data.in_file
|
||||||
|
|
||||||
|
if ($scope.in_file == 1) {
|
||||||
|
var delayMs = 1500; // delay in milliseconds
|
||||||
|
setTimeout(function(){
|
||||||
|
$('#get-more-newyear').modal('show');
|
||||||
|
}, delayMs);
|
||||||
|
if ($( window ).width() < 700) {
|
||||||
|
$('#get-more-newyear').on('show.bs.modal', function () {
|
||||||
|
$('.modal-dialog').css('margin',0);
|
||||||
|
$('.modal-content').css('height',$( window ).height()*0.95);
|
||||||
|
$('.modal-content').css('width',$( window ).width());
|
||||||
|
$('.myCarousel').css('height', $( window ).height()*0.95);
|
||||||
|
$('.myCarousel').css('width', 'auto');
|
||||||
|
$('.myCarousel').css('object-fit', 'cover');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('#get-more-newyear').on('show.bs.modal', function () {
|
||||||
|
$('.modal-dialog').css('margin-right',$( window ).width()/4);
|
||||||
|
$('.modal-dialog').css('margin-left',$( window ).width()/4);
|
||||||
|
$('.modal-dialog').css('margin-top',$( window ).height()/8);
|
||||||
|
$('.modal-content').css('height',$( window ).height()*0.7);
|
||||||
|
$('.modal-content').css('width',$( window ).width()*0.5);
|
||||||
|
$('.myCarousel').css('height', $( window ).height()*0.7);
|
||||||
|
$('.myCarousel').css('width', 'auto');
|
||||||
|
$('.myCarousel').css('object-fit', 'cover');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log('request_true');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user