issue #1 reset form resets selected icon to empty

This commit is contained in:
kplaczek
2018-04-04 19:44:11 +02:00
commit 20c8d2f763
197 changed files with 49256 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers;
use App\Paper\Paper;
class ClosedShops extends Controller
{
private $icon = 'frown-o';
private $daysClosed = ['11-03','18-03',
'01-04','02-04','08-04','15-04','22-04',
'01-05','03-05','13-05','20-05','31-05',
'10-06','17-06',
'08-07','15-07','22-07',
'12-08','15-08','19-08',
'09-09','16-09','23-09',
'14-10','21-10',
'01-11','11-11','18-11',
'09-12','16-12','25-12','16-12'
];
private $paper;
public function __construct()
{
$this->paper = new Paper();
}
public function tomorrow()
{
$today = new \DateTime();
$tomorrow = $today->modify('+1 day');
if(in_array($tomorrow->format('d-m'), $this->daysClosed)){
$this->paper->sendPrint('Jutro sklepy są zamknięte.', "Jutrzejszy dzień jest dniem \nwolnym od handlu ponieważ jutro \njest święto albo niedziela wolna \nod handlu\n\n".$tomorrow->format('d-m-Y'), $this->icon);
}
}
}