You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -171,18 +170,24 @@ public static function table(Table $table): Table
171
170
])
172
171
->actions([
173
172
ActionGroup::make([
174
-
ViewAction::make(),
175
-
EditAction::make(),
173
+
ViewAction::make()
174
+
->color('secondary'),
175
+
EditAction::make()
176
+
->color('primary'),
176
177
DeleteAction::make(),
178
+
177
179
Action::make('exibirmapa')
178
180
->label('Exibir Mapa')
179
-
->icon('fas-map-pin')
181
+
//->icon('fas-map-pin')
182
+
->icon('fas-map-location-dot')
183
+
->color('warning')
180
184
->url(function ($record) {
181
185
// Obter o endereço do usuário associado ao registro
182
-
$userAddress = $record->useraddresses;
186
+
$userAddress = $record->userAddresses->first();
183
187
184
188
// Verificar se o endereço existe
185
189
if ($userAddress) {
190
+
186
191
$street = urlencode($userAddress->street);
187
192
$number = urlencode($userAddress->number);
188
193
$city = urlencode($userAddress->city);
@@ -197,40 +202,43 @@ public static function table(Table $table): Table
197
202
198
203
Action::make('criaragendamento')
199
204
->label('Criar Agendamento')
200
-
->icon('fas-map-pin')
205
+
->icon('fas-calendar-check')
206
+
->color('info')
201
207
->requiresConfirmation()
202
208
->form([
203
209
Select::make('type_service')
204
210
->options(
205
-
AppoitmentTicketEnum::class
211
+
AppoitmentTicketEnum::class
206
212
),
207
213
DateTimePicker::make('date'),
208
214
])
209
215
->slideOver()
210
216
->action(function (Ticket$record, array$data) {
211
-
$users= $record->user_id;
212
-
Appointment::create([
213
-
'ticket_id' => $record->id,
217
+
$users= $record->user_id;
218
+
Appointment::create([
219
+
'ticket_id'=> $record->id,
214
220
'type_service' => $data['type_service'],
215
-
'date' => $data['date'],
221
+
'date'=> $data['date'],
216
222
]);
217
223
218
-
Notification::make()
224
+
Notification::make()
219
225
->title('Chamado agendado com sucesso')
220
226
->body("Seu Chamado de N. {$record->id} Agendado para " . \Carbon\Carbon::parse($data['date'])->format('d/m/Y H:i:s') . " de forma " . AppoitmentTicketEnum::from($data['type_service'])->getLabel())
0 commit comments