fix
This commit is contained in:
parent
5703804e5c
commit
1057eec8c0
|
|
@ -290,6 +290,7 @@ class TicketController extends Controller
|
||||||
// Send notification email to users
|
// Send notification email to users
|
||||||
|
|
||||||
if ($action == "confirm") {
|
if ($action == "confirm") {
|
||||||
|
dd($results);
|
||||||
foreach ($results as $result) {
|
foreach ($results as $result) {
|
||||||
list($year, $month, $day) = explode('-', $result['date']);
|
list($year, $month, $day) = explode('-', $result['date']);
|
||||||
Notes::create([
|
Notes::create([
|
||||||
|
|
@ -301,6 +302,37 @@ class TicketController extends Controller
|
||||||
'n_reason' => $ticket->type,
|
'n_reason' => $ticket->type,
|
||||||
'n_note' => $ticket->reason
|
'n_note' => $ticket->reason
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if($ticket->type == "WFH"){
|
||||||
|
// $user_ids = $request->users;
|
||||||
|
// $year = $request->year;
|
||||||
|
// $month = $request->month;
|
||||||
|
// $day = $request->day;
|
||||||
|
// $type = $request->type;
|
||||||
|
// foreach ($user_ids as $id) {
|
||||||
|
// $user = Admin::find($id);
|
||||||
|
// $date = Carbon::create($year, $month, $day)->setTimezone(env('TIME_ZONE'));
|
||||||
|
// $start = $date->copy()->setTime(7, 31, 11);
|
||||||
|
// $end = $type == 'half' ? $date->copy()->setTime(11, 31, 11) : $date->copy()->setTime(17, 1, 11);
|
||||||
|
// Tracking::insert([
|
||||||
|
// [
|
||||||
|
// 'name' => $user->name,
|
||||||
|
// 'user_id' => $user->id,
|
||||||
|
// 'status' => 'check in',
|
||||||
|
// 'time_string' => $start->format('Y-m-d H:i:s'),
|
||||||
|
// 'created_at' => $start->setTimezone('UTC')
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => $user->name,
|
||||||
|
// 'user_id' => $user->id,
|
||||||
|
// 'status' => 'check out',
|
||||||
|
// 'time_string' => $end->format('Y-m-d H:i:s'),
|
||||||
|
// 'created_at' => $end->setTimezone('UTC')
|
||||||
|
// ]
|
||||||
|
// ]);
|
||||||
|
// }
|
||||||
|
// $this->createOrUpdateRecordForCurrentMonth($month, $year);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket['updated_by'] = $admin->name;
|
$ticket['updated_by'] = $admin->name;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import {
|
||||||
import { update, Xdelete } from '@/rtk/helpers/CRUD'
|
import { update, Xdelete } from '@/rtk/helpers/CRUD'
|
||||||
import { get } from '@/rtk/helpers/apiService'
|
import { get } from '@/rtk/helpers/apiService'
|
||||||
import {
|
import {
|
||||||
Avatar,
|
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
Drawer,
|
Drawer,
|
||||||
|
|
@ -22,8 +21,7 @@ import {
|
||||||
Text,
|
Text,
|
||||||
Textarea,
|
Textarea,
|
||||||
TextInput,
|
TextInput,
|
||||||
Tooltip,
|
Tooltip
|
||||||
TypographyStylesProvider,
|
|
||||||
} from '@mantine/core'
|
} from '@mantine/core'
|
||||||
import { useDisclosure } from '@mantine/hooks'
|
import { useDisclosure } from '@mantine/hooks'
|
||||||
import { notifications } from '@mantine/notifications'
|
import { notifications } from '@mantine/notifications'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue