add all files

This commit is contained in:
2025-10-04 11:38:07 +02:00
parent 84a1f4eb35
commit 68c8245cef
1010 changed files with 266911 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/add-booking-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/add-service-category-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/add-service-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/add-worker-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
View File
+5
View File
@@ -0,0 +1,5 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/bookings-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/dashboard-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+195
View File
@@ -0,0 +1,195 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>bookings/booking-process">
<input type="hidden" name="servicelength" id="servicelength" value="00:00:00">
<div class="formRow">
<label class="formTitle">Vendég neve</label>
<input type="text" class="formInputBox" name="guest_name" value="">
</div>
<div class="formRow">
<label class="formTitle">Email</label>
<input type="text" class="formInputBox" name="guest_email" value="">
</div>
<div class="formRow">
<label class="formTitle">Telefon</label>
<input type="text" class="formInputBox" name="guest_phone" value="">
</div>
<div class="formRow">
<label class="formTitle">Dolgozó</label>
<select class="formDropdownBox" style="padding:0;" name="worker_id" id="worker_id">
<?php
foreach($workers as $workerItem){
echo '<option value="'.$workerItem->worker_id.'">'.$workerItem->worker_name.'</option>';
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Kezdő dátum</label>
<input type="date" class="formInputBox" name="booking_date" id="booking_date" value="<?php echo date('Y-m-d');?>">
</div>
<div class="formRow">
<label class="formTitle">Záró dátum</label>
<input type="date" class="formInputBox" name="end_booking_date" id="end_booking_date" value="<?php echo date('Y-m-d');?>">
</div>
<div class="formRow">
<label class="formTitle">Egész nap szabadnap</label>
<select class="formDropdownBox" style="padding:0;" name="free_day" id="free_day">
<option value="1">igen</option>
<option value="0" selected>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás(ok)</label>
<input type="text"
class="flexdatalist formInputBox"
data-data="../load_services.json"
data-search-in="service_name"
data-visible-properties='["service_name"]'
data-selection-required="true"
data-value-property="service_id"
data-text-property="{service_name}"
data-min-length="0"
multiple="multiple"
name="service_ids"
id="serviceList" style="background-color:white;">
</div>
<div class="formRow">
<label class="formTitle">Kezdő időpont</label>
<select class="formDropdownBox" style="padding:0;" name="booking_start_time" id="booking_start_time">
</select>
</div>
<div class="formRow">
<label class="formTitle">Záró időpont</label>
<input type="time" class="formInputBox" name="booking_finish_time" id="booking_finish_time" value="">
</div>
<div class="formRow">
<label class="formTitle">Értesítés küldése</label>
<select class="formDropdownBox" style="padding:0;" name="send_notification">
<option value="1">igen</option>
<option value="0" selected>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Értesítés nyelve</label>
<select class="formDropdownBox" style="padding:0;" name="lang">
<option value="no" selected>norvég</option>
<option value="en">angol</option>
<option value="hu">magyar</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="addNewBookingManual" value="Hozzáadás">
<a href="<?php echo base_url();?>bookings" class="cancelButton" >Mégsem</a>
</div>
</form>
</div>
<script>
$(document).ready(function(){
getAvaliableTimesOfTheDay();
$('#free_day').change(function(){
if($('#free_day').val() == '1'){
$('#booking_start_time').html('<option value="10:00:00">10:00:00</option>');
$('#booking_start_time').val('10:00:00');
$('#booking_finish_time').val('18:00:00');
$('#serviceList').val('');
}
else{
getAvaliableTimesOfTheDay();
}
});
$('#booking_date').change(function(){
if($('#free_day').val() != '1'){
$('#end_booking_date').val($('#booking_date').val());
getAvaliableTimesOfTheDay();
$("#booking_start_time option:first").attr('selected', true);
}
});
$('#booking_start_time').change(function(){
//getAvaliableTimesOfTheDay();
if($('#free_day').val() != '1'){
calculateServiceEndTime();
}
});
$('#serviceList').change(function(){
$.ajax({
url: '<?php echo base_url();?>ajax',
type: 'POST',
data: {
action:'calculate_service_length',
service_ids: $('#serviceList').val()
},
error: function() {
},
//dataType: 'json',
success: function(data) {
},
}).done(function(result){
$('#servicelength').val(result);
if($('#free_day').val() != '1'){
getAvaliableTimesOfTheDay();
calculateServiceEndTime();
}
});
});
$('#worker_id').change(function(){
if($('#free_day').val() != '1'){
getAvaliableTimesOfTheDay();
}
});
});
function getAvaliableTimesOfTheDay(){
var selectedDate = $('#booking_date').val();
$.ajax({
url: '<?php echo base_url();?>ajax',
type: 'POST',
data: {
action:'getAvailableTimeOptions',
worker_id:$('#worker_id').val(),
servicelength:$('#servicelength').val(),
selectedDate:selectedDate
},
error: function() {
},
//dataType: 'json',
success: function(data) {
},
}).done(function(result){
if(result != 0){
$('#booking_start_time').html(result);
calculateServiceEndTime();
}
else{
$('#booking_start_time').html('<option value="">Nincs erre a napra szabad időpont!</option>');
}
});
}
function calculateServiceEndTime(){
var selectedTotalTime = $('#booking_start_time').val();
const selectedServiceDatetime = new Date('<?php echo date('Y-m-d');?> ' + $('#servicelength').val());
//console.log($('#servicelength').val());
var subTotalTimeHours = moment.utc(selectedTotalTime,'HH:mm').add(selectedServiceDatetime.getHours(),'hour').format('HH:mm');
var subTotalTimeMinutes = moment.utc(subTotalTimeHours,'HH:mm').add(selectedServiceDatetime.getMinutes(),'minutes').format('HH:mm');
//console.log(subTotalTimeMinutes);
$('#booking_finish_time').val(subTotalTimeMinutes);
}
</script>
@@ -0,0 +1,20 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>services/service-category-process">
<div class="formRow">
<label class="formTitle">Kategória slug</label>
<input type="text" class="formInputBox" name="serv_cat_slug" value="">
</div>
<div class="formRow">
<label class="formTitle">Kategória név</label>
<input type="text" class="formInputBox" name="serv_cat_name" value="">
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="addNewServiceCategory" value="Hozzáadás">
<a href="<?php echo base_url();?>service-categories" class="cancelButton">Mégsem</a>
</div>
</form>
</div>
+82
View File
@@ -0,0 +1,82 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>services/service-process">
<div class="formRow">
<label class="formTitle">Típus</label>
<select class="formDropdownBox" style="padding:0;" name="service_type">
<option value="beauty" selected>beauty</option>
<option value="barber">barber</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Kategória (NO)</label>
<input type="text" class="formInputBox" name="service_category_no" value="">
</div>
<div class="formRow">
<label class="formTitle">Kategória (EN)</label>
<input type="text" class="formInputBox" name="service_category_en" value="">
</div>
<div class="formRow">
<label class="formTitle">Kategória (HU)</label>
<input type="text" class="formInputBox" name="service_category_hu" value="">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (NO)</label>
<input type="text" class="formInputBox" name="service_name_no" value="">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (EN)</label>
<input type="text" class="formInputBox" name="service_name_en" value="">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (HU)</label>
<input type="text" class="formInputBox" name="service_name_hu" value="">
</div>
<div class="formRow">
<label class="formTitle">Leírás (NO)</label>
<input type="text" class="formInputBox" name="service_description_no" value="">
</div>
<div class="formRow">
<label class="formTitle">Leírás (EN)</label>
<input type="text" class="formInputBox" name="service_description_en" value="">
</div>
<div class="formRow">
<label class="formTitle">Leírás (HU)</label>
<input type="text" class="formInputBox" name="service_description_hu" value="">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás ára</label>
<input type="number" class="formInputBox" name="service_price" value="">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás időtartama</label>
<input type="time" class="formInputBox" name="service_time" value="">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás kategória</label>
<select class="formDropdownBox" style="padding:0;" name="service_category_id">
<?php
if(!empty($serviceCategories)){
foreach($serviceCategories as $serviceCategoryItem){
echo '<option value="'.$serviceCategoryItem->service_category_id.'" selected>'.$serviceCategoryItem->serv_cat_name.'</option>';
}
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Aktív</label>
<select class="formDropdownBox" style="padding:0;" name="is_enabled">
<option value="1" selected>igen</option>
<option value="0">nem</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="addNewService" value="Hozzáadás">
<a href="<?php echo base_url();?>services" class="cancelButton">Mégsem</a>
</div>
</form>
</div>
+57
View File
@@ -0,0 +1,57 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>workers/worker-process" enctype="multipart/form-data">
<div class="formRow">
<label class="formTitle">Név</label>
<input type="text" class="formInputBox" name="worker_name" value="">
</div>
<div class="formRow">
<label class="formTitle">Profilkép</label>
<input type="file" class="formInputBox" name="worker_img" value="">
</div>
<div class="formRow">
<label class="formTitle">Leírás</label>
<input type="text" class="formInputBox" name="worker_info" value="">
</div>
<div class="formRow">
<label class="formTitle">Aktív</label>
<select class="formDropdownBox" style="padding:0;" name="is_active">
<option value="1" selected>igen</option>
<option value="0">nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Beauty</label>
<select class="formDropdownBox" style="padding:0;" name="is_beauty">
<option value="1" selected>igen</option>
<option value="0">nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Barber</label>
<select class="formDropdownBox" style="padding:0;" name="is_barber">
<option value="1" selected>igen</option>
<option value="0">nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás kategória</label>
<select class="formDropdownBox" style="padding:0;" name="service_category_id">
<?php
if(!empty($serviceCategories)){
foreach($serviceCategories as $serviceCategoryItem){
echo '<option value="'.$serviceCategoryItem->service_category_id.'" selected>'.$serviceCategoryItem->serv_cat_name.'</option>';
}
}
?>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="addNewWorker" value="Hozzáadás">
<a href="<?php echo base_url();?>workers" class="cancelButton">Mégsem</a>
</div>
</form>
</div>
+94
View File
@@ -0,0 +1,94 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<div class="form-row">
<a href="<?php echo SITEURL;?>bookings/add-booking" class="submitBtn">Új foglalás</a>
</div>
<div class="form-row">
<select id="booking-filter" class="formDropdownBox" style="padding:0">
<option value="">Minden</option>
<?php
foreach($workers as $workerItem){
echo '<option value="'.$workerItem->worker_id.'" '.(isset($_GET['worker']) && $_GET['worker'] == $workerItem->worker_id?' selected':'').'>'.$workerItem->worker_name.'</option>';
}
?>
</select>
</div>
<div class="form-row">
<table class="tableClass">
<tr>
<td></td>
<td>#</td>
<td>Vendég neve</td>
<td>Email</td>
<td>Telefon</td>
<td>Dolgozó</td>
<td>Foglalási dátum</td>
<td>Szolg. kezdete</td>
<td>Szolg. vége</td>
<td>Szolgáltatások</td>
</tr>
<?php
if(is_array($results)){
foreach($results as $resultItem){
?>
<tr>
<td>
<a href="<?php echo SITEURL;?>bookings/update-booking/<?php echo $resultItem->booking_id ;?>"><i class="fas fa-edit"></i></a>
| <a href="<?php echo site_url().'bookings/booking-process?delete-booking='.$resultItem->booking_id;?>" onclick="return confirm('Valóban törölni szeretnéd?');"><i class="fas fa-trash-alt" style="font-size: 14px;color:#585858;"></i></a>
</td>
<td>#<?php echo $resultItem->booking_id;?></td>
<td><?php echo $resultItem->guest_name;?></td>
<td><?php echo $resultItem->guest_email;?></td>
<td><?php echo $resultItem->guest_phone;?></td>
<td><?php echo $resultItem->worker_name;?></td>
<td style="min-width:85px;"><?php echo $resultItem->booking_date;?></td>
<td><?php echo $resultItem->booking_start_time;?></td>
<td><?php echo $resultItem->booking_finish_time;?></td>
<td><?php
if(!empty($resultItem->services)){
echo '<table class="tableInTable">';
echo '<tr>';
echo '<td>Típus</td>';
echo '<td>Szolgáltalás neve</td>';
echo '<td>Ár</td>';
echo '<td>Időtartam</td>';
echo '</tr>';
foreach($resultItem->services as $serviceItem){
echo '<tr>';
echo '<td>'.$serviceItem->service_type.'</td>';
echo '<td>'.$serviceItem->service_name.'</td>';
echo '<td>'.$serviceItem->service_price.'</td>';
echo '<td>'.$serviceItem->service_time.'</td>';
echo '</tr>';
}
echo '</table>';
}
?></td>
</tr>
<?php
}
}
else{
echo '<tr>';
echo '<td colspan="10">Nincs bejegyzett foglalás</td>';
echo '</tr>';
}
?>
</table>
</div>
</div>
<script>
$(document).ready(function(){
$('#booking-filter').change(function(){
if($('#booking-filter').val() != ''){
$(location).attr('href', '<?php SITEURL;?>bookings?worker='+$('#booking-filter').val());
}
else{
$(location).attr('href', '<?php SITEURL;?>bookings');
}
});
});
</script>
+81
View File
@@ -0,0 +1,81 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<script src="<?php echo SITEURL;?>assets/js/calendar.js" defer></script>
<div class="contianer">
<div class="calendar">
<div class="calendar-header">
<span class="month-picker" id="month-picker"> May </span>
<div class="year-picker" id="year-picker">
<span class="year-change" id="pre-year">
<pre><</pre>
</span>
<span id="year">2020 </span>
<span class="year-change" id="next-year">
<pre>></pre>
</span>
</div>
</div>
<div class="calendar-body">
<div class="calendar-week-days">
<div>V</div>
<div>H</div>
<div>K</div>
<div>Sze</div>
<div>CS</div>
<div>P</div>
<div>Szo</div>
</div>
<div class="calendar-days">
</div>
</div>
<div class="calendar-footer">
</div>
<div class="date-time-formate">
<div class="day-text-formate">MA</div>
<div class="date-time-value">
<div class="time-formate">01:41:20</div>
<div class="date-formate">2022 - march - 03</div>
</div>
</div>
<div class="month-list"></div>
</div>
<div class="calendarContent"></div>
</div>
</div>
<script>
$(document).ready(function(){
});
function hasEventDay(year, monthNumber, dayNumber){
var month = monthNumber+1 > 9 ? (monthNumber+1) : '0' + (monthNumber+1);
var day = dayNumber > 9 ? dayNumber : '0' + dayNumber;
var selectedDate = year +'-'+ month +'-'+ day;
//console.log(selectedDate);
var status = 0;
$.ajax({
url: '<?php echo SITEURL;?>ajax',
type: 'POST',
data: {
action:'dayHasEvent',
dayDate: selectedDate
},
error: function() {
},
//dataType: 'json',
success: function(data) {
status = data;
return status;
console.log(status);
},
}).done(function(result){
});
return status;
}
</script>
@@ -0,0 +1,39 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<div class="form-row">
<a href="<?php echo SITEURL;?>services/add-service-category" class="submitBtn">Új szolgáltatás kategória</a>
</div>
<div class="form-row">
<table class="tableClass">
<tr>
<td style="min-width:55px;"></td>
<td>#</td>
<td>Kategória slug</td>
<td>Kategória név</td>
</tr>
<?php
if(is_array($results)){
foreach($results as $resultItem){
?>
<tr>
<td>
<a href="<?php echo SITEURL;?>services/update-service-category/<?php echo $resultItem->service_category_id;?>"><i class="fas fa-edit"></i></a>
| <a href="<?php echo site_url().'services/service-category-process?delete-service-category='.$resultItem->service_category_id;?>" onclick="return confirm('Valóban törölni szeretnéd?');"><i class="fas fa-trash-alt" style="font-size: 14px;color:#585858;"></i></a>
</td>
<td>#<?php echo $resultItem->service_category_id;?></td>
<td><?php echo $resultItem->serv_cat_slug;?></td>
<td><?php echo $resultItem->serv_cat_name;?></td>
</tr>
<?php
}
}
else{
echo '<tr>';
echo '<td colspan="10">Nincs találat</td>';
echo '</tr>';
}
?>
</table>
</div>
</div>
+63
View File
@@ -0,0 +1,63 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<div class="form-row">
<a href="<?php echo SITEURL;?>services/add-service" class="submitBtn">Új szolgáltatás</a>
</div>
<div class="form-row">
<table class="tableClass">
<tr>
<td style="min-width:55px;"></td>
<td>#</td>
<td>Típus</td>
<td>Kategória (NO)</td>
<td>Kategória (EN)</td>
<td>Kategória (HU)</td>
<td>Megnevezés (NO)</td>
<td>Megnevezés (EN)</td>
<td>Megnevezés (HU)</td>
<td>Leírás (NO)</td>
<td>Leírás (EN)</td>
<td>Leírás (HU)</td>
<td>Ár</td>
<td>Időtartam</td>
<td>Kategória</td>
<td>Aktív</td>
</tr>
<?php
if(is_array($results)){
foreach($results as $resultItem){
?>
<tr>
<td>
<a href="<?php echo SITEURL;?>services/update-service/<?php echo $resultItem->service_id;?>"><i class="fas fa-edit"></i></a>
| <a href="<?php echo site_url().'services/service-process?delete-service='.$resultItem->service_id;?>" onclick="return confirm('Valóban törölni szeretnéd?');"><i class="fas fa-trash-alt" style="font-size: 14px;color:#585858;"></i></a>
</td>
<td>#<?php echo $resultItem->service_id;?></td>
<td><?php echo $resultItem->service_type;?></td>
<td><?php echo $resultItem->service_category_no;?></td>
<td><?php echo $resultItem->service_category_en;?></td>
<td><?php echo $resultItem->service_category_hu;?></td>
<td><?php echo $resultItem->service_name_no;?></td>
<td><?php echo $resultItem->service_name_en;?></td>
<td><?php echo $resultItem->service_name_hu;?></td>
<td><?php echo $resultItem->service_description_no;?></td>
<td><?php echo $resultItem->service_description_en;?></td>
<td><?php echo $resultItem->service_description_hu;?></td>
<td><?php echo $resultItem->service_price;?></td>
<td><?php echo $resultItem->service_time;?></td>
<td><?php echo $resultItem->serv_cat_name;?></td>
<td><?php echo $resultItem->is_enabled?'igen':'nem';?></td>
</tr>
<?php
}
}
else{
echo '<tr>';
echo '<td colspan="10">Nincs találat</td>';
echo '</tr>';
}
?>
</table>
</div>
</div>
+219
View File
@@ -0,0 +1,219 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>bookings/booking-process">
<input type="hidden" name="servicelength" id="servicelength" value="00:00:00">
<input type="hidden" name="booking_id" value="<?php echo $selectedItem->booking_id;?>">
<div class="formRow">
<label class="formTitle">Vendég neve</label>
<input type="text" class="formInputBox" name="guest_name" value="<?php echo $selectedItem->guest_name;?>">
</div>
<div class="formRow">
<label class="formTitle">Email</label>
<input type="text" class="formInputBox" name="guest_email" value="<?php echo $selectedItem->guest_email;?>">
</div>
<div class="formRow">
<label class="formTitle">Telefon</label>
<input type="text" class="formInputBox" name="guest_phone" value="<?php echo $selectedItem->guest_phone;?>">
</div>
<div class="formRow">
<label class="formTitle">Dolgozó</label>
<select class="formDropdownBox" style="padding:0;" name="worker_id" id="worker_id">
<?php
foreach($workers as $workerItem){
echo '<option value="'.$workerItem->worker_id.'" '.($workerItem->worker_id == $selectedItem->worker_id?'selected':'').'>'.$workerItem->worker_name.'</option>';
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Kezdő dátum</label>
<input type="date" class="formInputBox" name="booking_date" id="booking_date" value="<?php echo $selectedItem->booking_date;?>">
</div>
<div class="formRow">
<label class="formTitle">Záró dátum</label>
<input type="date" class="formInputBox" name="end_booking_date" id="end_booking_date" value="<?php echo $selectedItem->booking_date;?>">
</div>
<div class="formRow">
<label class="formTitle">Egész nap szabadnap</label>
<select class="formDropdownBox" style="padding:0;" name="free_day" id="free_day">
<option value="1">igen</option>
<option value="0" selected>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás(ok)</label>
<input type="text"
class="flexdatalist formInputBox"
data-data="/load_services.json"
data-search-in="service_name"
data-visible-properties='["service_name"]'
data-selection-required="true"
data-value-property="service_id"
data-text-property="{service_name}"
data-min-length="1"
multiple="multiple"
name="service_ids"
value="<?php
if($selectedItem->service_ids != ''){
$services = unserialize($selectedItem->service_ids);
echo implode(',',$services);
}
?>"
id="serviceList" required style="background-color:white;">
</div>
<div class="formRow">
<label class="formTitle">Kezdő időpont</label>
<input type="time" class="formInputBox" name="booking_start_time" id="booking_start_time" value="<?php echo $selectedItem->booking_start_time;?>">
</div>
<div class="formRow">
<label class="formTitle">Záró időpont</label>
<input type="time" class="formInputBox" name="booking_finish_time" id="booking_finish_time" value="<?php echo $selectedItem->booking_finish_time;?>">
</div>
<div class="formRow">
<label class="formTitle">Értesítés küldése</label>
<select class="formDropdownBox" style="padding:0;" name="send_notification">
<option value="1">igen</option>
<option value="0" selected>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Értesítés nyelve</label>
<select class="formDropdownBox" style="padding:0;" name="lang">
<option value="no" selected>norvég</option>
<option value="en">angol</option>
<option value="hu">magyar</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="updateBookingManual" value="Módosítás">
<a href="<?php echo base_url();?>bookings" class="cancelButton" >Mégsem</a>
</div>
</form>
</div>
<script>
$(document).ready(function(){
//getAvaliableTimesOfTheDay();
$('#free_day').change(function(){
if($('#free_day').val() == '1'){
$('#booking_start_time').html('<option value="10:00:00">10:00:00</option>');
$('#booking_start_time').val('10:00:00');
$('#booking_finish_time').val('18:00:00');
$('#serviceList').val('');
}
else{
getAvaliableTimesOfTheDay();
}
});
$('#booking_date').change(function(){
if($('#free_day').val() != '1'){
$('#end_booking_date').val($('#booking_date').val());
getAvaliableTimesOfTheDay();
$("#booking_start_time option:first").attr('selected', true);
}
});
$('#booking_start_time').change(function(){
if($('#free_day').val() != '1'){
$.ajax({
url: '<?php echo base_url();?>ajax',
type: 'POST',
data: {
action:'calculate_service_length',
service_ids: $('#serviceList').val()
},
error: function() {
},
//dataType: 'json',
success: function(data) {
},
}).done(function(result){
$('#servicelength').val(result);
if($('#free_day').val() != '1'){
getAvaliableTimesOfTheDay();
calculateServiceEndTime();
}
});
}
});
$('#serviceList').change(function(){
$.ajax({
url: '<?php echo base_url();?>ajax',
type: 'POST',
data: {
action:'calculate_service_length',
service_ids: $('#serviceList').val()
},
error: function() {
},
//dataType: 'json',
success: function(data) {
},
}).done(function(result){
$('#servicelength').val(result);
if($('#free_day').val() != '1'){
getAvaliableTimesOfTheDay();
calculateServiceEndTime();
}
});
});
$('#worker_id').change(function(){
if($('#free_day').val() != '1'){
getAvaliableTimesOfTheDay();
}
});
});
function getAvaliableTimesOfTheDay(){
var selectedDate = $('#booking_date').val();
$.ajax({
url: '<?php echo base_url();?>ajax',
type: 'POST',
data: {
action:'getAvailableTimeOptions',
worker_id:$('#worker_id').val(),
servicelength:$('#servicelength').val(),
selectedDate:selectedDate
},
error: function() {
},
//dataType: 'json',
success: function(data) {
},
}).done(function(result){
if(result != 0){
$('#booking_start_time').html(result);
calculateServiceEndTime();
}
else{
$('#booking_start_time').html('<option value="">Nincs erre a napra szabad időpont!</option>');
}
});
}
function calculateServiceEndTime(){
var selectedTotalTime = $('#booking_start_time').val();
const selectedServiceDatetime = new Date('<?php echo date('Y-m-d');?> ' + $('#servicelength').val());
//console.log($('#servicelength').val());
var subTotalTimeHours = moment.utc(selectedTotalTime,'HH:mm').add(selectedServiceDatetime.getHours(),'hour').format('HH:mm');
var subTotalTimeMinutes = moment.utc(subTotalTimeHours,'HH:mm').add(selectedServiceDatetime.getMinutes(),'minutes').format('HH:mm');
//console.log(subTotalTimeMinutes);
$('#booking_finish_time').val(subTotalTimeMinutes);
}
</script>
@@ -0,0 +1,20 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>services/service-category-process">
<input type="hidden" name="service_category_id" value="<?php echo $selectedItem->service_category_id;?>">
<div class="formRow">
<label class="formTitle">Kategória slug</label>
<input type="text" class="formInputBox" name="serv_cat_slug" value="<?php echo $selectedItem->serv_cat_slug;?>">
</div>
<div class="formRow">
<label class="formTitle">Kategória név</label>
<input type="text" class="formInputBox" name="serv_cat_name" value="<?php echo $selectedItem->serv_cat_name;?>">
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="updateServiceCategory" value="Módosítás">
<a href="<?php echo base_url();?>service-categories" class="cancelButton">Mégsem</a>
</div>
</form>
</div>
+81
View File
@@ -0,0 +1,81 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>services/service-process">
<input type="hidden" name ="service_id" value="<?php echo $selectedItem->service_id;?>">
<div class="formRow">
<label class="formTitle">Típus</label>
<select class="formDropdownBox" style="padding:0;" name="service_type">
<option value="beauty" <?php echo $selectedItem->service_type=='beauty'?'selected':'';?>>beauty</option>
<option value="barber" <?php echo $selectedItem->service_type=='barber'?'selected':'';?>>barber</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Kategória (NO)</label>
<input type="text" class="formInputBox" name="service_category_no" value="<?php echo $selectedItem->service_category_no;?>">
</div>
<div class="formRow">
<label class="formTitle">Kategória (EN)</label>
<input type="text" class="formInputBox" name="service_category_en" value="<?php echo $selectedItem->service_category_en;?>">
</div>
<div class="formRow">
<label class="formTitle">Kategória (HU)</label>
<input type="text" class="formInputBox" name="service_category_hu" value="<?php echo $selectedItem->service_category_hu;?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (NO)</label>
<input type="text" class="formInputBox" name="service_name_no" value="<?php echo $selectedItem->service_name_no;?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (EN)</label>
<input type="text" class="formInputBox" name="service_name_en" value="<?php echo $selectedItem->service_name_en;?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (HU)</label>
<input type="text" class="formInputBox" name="service_name_hu" value="<?php echo $selectedItem->service_name_hu;?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (NO)</label>
<input type="text" class="formInputBox" name="service_description_no" value="<?php echo $selectedItem->service_description_no;?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (EN)</label>
<input type="text" class="formInputBox" name="service_description_en" value="<?php echo $selectedItem->service_description_en;?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (HU)</label>
<input type="text" class="formInputBox" name="service_description_hu" value="<?php echo $selectedItem->service_description_hu;?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás ára</label>
<input type="number" class="formInputBox" name="service_price" value="<?php echo $selectedItem->service_price;?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás időtartama</label>
<input type="time" class="formInputBox" name="service_time" value="<?php echo $selectedItem->service_time;?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás kategória</label>
<select class="formDropdownBox" style="padding:0;" name="service_category_id">
<?php
if(!empty($serviceCategories)){
foreach($serviceCategories as $serviceCategoryItem){
echo '<option value="'.$serviceCategoryItem->service_category_id.'" '.($selectedItem->service_category_id == $serviceCategoryItem->service_category_id?' selected':'').'>'.$serviceCategoryItem->serv_cat_name.'</option>';
}
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Aktív</label>
<select class="formDropdownBox" style="padding:0;" name="is_enabled">
<option value="1" <?php echo $selectedItem->is_enabled?'selected':'';?>>igen</option>
<option value="0" <?php echo !$selectedItem->is_enabled?'selected':'';?>>nem</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="updateService" value="Módosítás">
<a href="<?php echo base_url();?>services" class="cancelButton" >Mégsem</a>
</div>
</form>
</div>
+61
View File
@@ -0,0 +1,61 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>workers/worker-process" enctype="multipart/form-data">
<input type="hidden" name ="worker_id" value="<?php echo $selectedItem->worker_id;?>">
<div class="formRow">
<label class="formTitle">Név</label>
<input type="text" class="formInputBox" name="worker_name" value="<?php echo $selectedItem->worker_name;?>">
</div>
<div class="formRow">
<img src="<?php echo SITEURL.'assets/img/workers/'.$selectedItem->worker_profile_img;?>" width="100px">
</div>
<div class="formRow">
<label class="formTitle">Profilkép</label>
<input type="file" class="formInputBox" name="worker_img">
</div>
<div class="formRow">
<label class="formTitle">Leírás</label>
<input type="text" class="formInputBox" name="worker_info" value="<?php echo $selectedItem->worker_info;?>">
</div>
<div class="formRow">
<label class="formTitle">Beauty</label>
<select class="formDropdownBox" style="padding:0;" name="is_beauty">
<option value="1" <?php echo $selectedItem->is_beauty?'selected':'';?>>igen</option>
<option value="0" <?php echo !$selectedItem->is_beauty?'selected':'';?>>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Barber</label>
<select class="formDropdownBox" style="padding:0;" name="is_barber">
<option value="1" <?php echo $selectedItem->is_barber?'selected':'';?>>igen</option>
<option value="0" <?php echo !$selectedItem->is_barber?'selected':'';?>>nem</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás kategória</label>
<select class="formDropdownBox" style="padding:0;" name="service_category_id">
<?php
if(!empty($serviceCategories)){
foreach($serviceCategories as $serviceCategoryItem){
echo '<option value="'.$serviceCategoryItem->service_category_id.'" '.($selectedItem->service_category_id == $serviceCategoryItem->service_category_id?' selected':'').'>'.$serviceCategoryItem->serv_cat_name.'</option>';
}
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Aktív</label>
<select class="formDropdownBox" style="padding:0;" name="is_active">
<option value="1" <?php echo $selectedItem->is_active?'selected':'';?>>igen</option>
<option value="0" <?php echo !$selectedItem->is_active?'selected':'';?>>nem</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="updateWorker" value="Módosítás">
<a href="<?php echo base_url();?>workers" class="cancelButton">Mégsem</a>
</div>
</form>
</div>
@@ -0,0 +1,113 @@
<style>
.schedule-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
color: #fff;
}
.schedule-row label {
min-width: 100px;
}
.schedule-row input[type="text"] {
background: #fff;
border: 1px solid #ccc;
padding: 4px 6px;
color: #000;
width: 70px;
font-size: 14px;
text-align: center;
}
.alternate-week-wrapper {
margin-left: 15px;
display: flex;
align-items: center;
gap: 5px;
color: #fff;
font-weight: bold;
}
.schedule-row input[type="checkbox"] {
transform: scale(1.1);
accent-color: #00ffcc;
background-color: #000;
border: 1px solid #fff;
}
input[type="submit"] {
padding: 8px 16px;
font-weight: bold;
background: #333;
color: #fff;
border: 1px solid #555;
cursor: pointer;
margin-top: 20px;
}
</style>
<h2>Dolgozó munkaidő beállítása</h2>
<!-- Worker selection form (GET) -->
<form method="GET" action="<?php echo site_url('admin/worker_schedule'); ?>">
<label for="worker_id">Dolgozó:</label>
<select name="worker_id" onchange="this.form.submit()" required>
<option value="">-- Válassz dolgozót --</option>
<?php foreach ($workers as $worker): ?>
<option value="<?= $worker->worker_id ?>" <?= isset($selectedWorkerId) && $selectedWorkerId == $worker->worker_id ? 'selected' : '' ?>>
<?= $worker->worker_name ?>
</option>
<?php endforeach; ?>
</select>
</form>
<?php
$days = ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'];
?>
<?php if (!empty($schedule)): ?>
<h3>Jelenlegi beállítások</h3>
<ul style="color: white; margin-bottom: 20px;">
<?php foreach ($schedule as $row): ?>
<li>
<?= $days[$row->weekday] ?>:
<?= substr($row->start_time, 0, 5) ?> - <?= substr($row->end_time, 0, 5) ?>
<?= $row->is_alternate_week ? '(Minden 2. hét)' : '' ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if (isset($selectedWorkerId)): ?>
<!-- Schedule update form (POST) -->
<form method="POST" action="<?php echo site_url('admin/store_worker_schedule'); ?>">
<input type="hidden" name="worker_id" value="<?= $selectedWorkerId ?>">
<h3>Munkaidő beállítása</h3>
<?php
$scheduleMap = [];
foreach ($schedule as $entry) {
$scheduleMap[$entry->weekday] = $entry;
}
for ($i = 0; $i < 7; $i++):
$start = isset($scheduleMap[$i]) ? $scheduleMap[$i]->start_time : '';
$end = isset($scheduleMap[$i]) ? $scheduleMap[$i]->end_time : '';
$checked = isset($scheduleMap[$i]) && $scheduleMap[$i]->is_alternate_week ? 'checked' : '';
?>
<div class="schedule-row">
<label><?= $days[$i] ?></label>
<input type="text" name="start_time[<?= $i ?>]" value="<?= substr($start, 0, 5) ?>" pattern="[0-2][0-9]:[0-5][0-9]" placeholder="HH:MM" inputmode="numeric">
<input type="text" name="end_time[<?= $i ?>]" value="<?= substr($end, 0, 5) ?>" pattern="[0-2][0-9]:[0-5][0-9]" placeholder="HH:MM" inputmode="numeric">
<div class="alternate-week-wrapper">
<input type="checkbox" id="alt_week_<?= $i ?>" name="alternate_week[<?= $i ?>]" value="1" <?= $checked ?>>
<label for="alt_week_<?= $i ?>">Minden 2. hét?</label>
</div>
<input type="hidden" name="weekday[<?= $i ?>]" value="<?= $i ?>">
</div>
<?php endfor; ?>
<input type="submit" value="Mentés">
</form>
<?php endif; ?>
+49
View File
@@ -0,0 +1,49 @@
<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<div class="form-row">
<a href="<?php echo SITEURL;?>workers/add-worker" class="submitBtn">Új dolgozó</a>
</div>
<div class="form-row">
<table class="tableClass">
<tr>
<td></td>
<td>#</td>
<td>Profilkép</td>
<td>Név</td>
<td>Leírás</td>
<td>Beauty</td>
<td>Barber</td>
<td>Szerviz kategória</td>
<td>Aktív</td>
</tr>
<?php
if(is_array($results)){
foreach($results as $resultItem){
?>
<tr>
<td>
<a href="<?php echo SITEURL;?>workers/update-worker/<?php echo $resultItem->worker_id;?>"><i class="fas fa-edit"></i></a>
| <a href="<?php echo site_url().'workers/worker-process?delete-worker='.$resultItem->worker_id;?>" onclick="return confirm('Valóban törölni szeretnéd?');"><i class="fas fa-trash-alt" style="font-size: 14px;color:#585858;"></i></a>
</td>
<td>#<?php echo $resultItem->worker_id;?></td>
<td><img src="<?php echo SITEURL.'assets/img/'.$resultItem->worker_profile_img;?>" style="width:50px;margin:0;" /></td>
<td><?php echo $resultItem->worker_name;?></td>
<td><?php echo $resultItem->worker_info;?></td>
<td><?php echo $resultItem->is_beauty?'igen':'nem';?></td>
<td><?php echo $resultItem->is_barber?'igen':'nem';?></td>
<td><?php echo $resultItem->serv_cat_name;?></td>
<td><?php echo $resultItem->is_active?'igen':'nem';?></td>
</tr>
<?php
}
}
else{
echo '<tr>';
echo '<td colspan="10">Nincs találat</td>';
echo '</tr>';
}
?>
</table>
</div>
</div>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/service-categories-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
View File
View File
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/services-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+5
View File
@@ -0,0 +1,5 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/update-booking-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/update-service-category-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/update-service-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/update-worker-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+33
View File
@@ -0,0 +1,33 @@
<div class="logo-container">
<img src="<?php echo SITEURL;?>img/logo.png" width="100%">
</div>
<div class="siteName"></div>
<div class="main-container" style="background-color:#e8e4f8;">
<div class="login-container">
<div class="login-row">
<?php
if(isset($message)){
echo '<div class="message '.$message_class.'">'.$message.'</div>';
}
?>
</div>
<form method="post" action="<?php echo site_url().'login'?>">
<div class="login-row">
<label class="login-labels"><i class="fas fa-user-tie"></i></label><input type="text" class="loginform-text username" placeholder="Felhasználó név" name="username" id="username" value="<?php echo $username;?>">
</div>
<div class="login-row">
<label class="login-labels"><i class="fas fa-key"></i></label><input type="password" class="loginform-text password" placeholder="Jelszó" name="password" id="password" value="<?php echo $password;?>">
</div>
<div class="login-row">
<input type="hidden" name="remember" value="off">
<input type="checkbox" name="remember" id="remember" <?php echo $username!=''?' checked':'';?>><label for="remember" style="display:inline-block; text-align:left;margin-left:10px;margin-top:10px;cursor:pointer;">Jelszó megjegyzése</label>
</div>
<div class="login-row">
<input type="submit" class="button login" value="Bejelentkezés" name="sendLogin">
</div>
</form>
</div>
</div>
<div class="loginSubText"></div>
View File
+5
View File
@@ -0,0 +1,5 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/worker-schedule-overrides-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
include(getcwd().'/application/views/includes/skeleton-top.php');
include(getcwd().'/application/views/admin/includes/workers-form.php');
include(getcwd().'/application/views/includes/skeleton-bottom.php');
?>