Skip to content

Fitur: Pembuatan API Tiket Untuk Cek Status Tiket#37

Merged
apidong merged 4 commits intodevelopmentfrom
dev-api-tiket
Sep 23, 2025
Merged

Fitur: Pembuatan API Tiket Untuk Cek Status Tiket#37
apidong merged 4 commits intodevelopmentfrom
dev-api-tiket

Conversation

@ujgsp
Copy link

@ujgsp ujgsp commented Sep 4, 2025

Deskripsi

Pembuatan API Tiket untuk cek status Tiket

url: http://localhost:8083/api/ticket/id/1

Perubahan

  • Ubahan pada TokenResource, perbaiki transalate dan urutan grup menu
  • Menambahkan route api cek id tiket
  • Menambahkan TiketController

Screenshot

  • Cek tiket id valid dengan kondisi token tidak expired
image
  • Cek tiket id valid dengan kondisi token expired
image
  • Cek tiket id tidak valid dengan kondisi token tidak expired
image

Untuk Issue:

- Perbaikan navigasilabel, plurallabel dan navigationgroup
- Tambahkan translate Token
- Menambahkan route api cek tiket
- Menambahkan controller tiket
@ujgsp ujgsp requested a review from apidong September 4, 2025 03:35
@apidong apidong requested a review from Copilot September 23, 2025 07:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new API endpoint for checking ticket status by ID. The API provides ticket information including status, name, service, description, and timestamps in a structured JSON response format.

Key changes:

  • Added new API route for ticket status checking with authentication
  • Implemented TicketController with ticket retrieval and response formatting
  • Enhanced TokenResource with proper translation support and navigation grouping

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
routes/api.php Added authenticated API route for ticket status checking
app/Http/Controllers/Api/TicketController.php New controller with ticket retrieval and JSON response formatting
app/Filament/Resources/TokenResource.php Updated navigation labels to use translations and proper grouping
lang/id.json Added Indonesian translation for "Tokens"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


if (! $ticket) {
return response()->json([
'message' => 'Ticket not found',
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message should be localized to match the application's internationalization pattern, similar to how other messages use translation keys.

Suggested change
'message' => 'Ticket not found',
'message' => __('ticket.not_found'),

Copilot uses AI. Check for mistakes.
$plainText = trim(strip_tags($content));

return response()->json([
'message' => 'Success',
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success message should be localized to maintain consistency with the application's internationalization approach.

Suggested change
'message' => 'Success',
'message' => __('Success'),

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@apidong apidong merged commit 5bba354 into development Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants