๐Ÿ“Š Test Statistics Cards

Tanggal Test: 16/08/2026 12:13:12

Status: STATISTICS CARDS IMPLEMENTED

โœ… 1. Statistics Cards yang Ditambahkan

Card Icon Color Calculation Status
Total Kendaraan directions_car Primary (Blue) vehicles.value.length โœ… ADDED
Mesin Hidup power Positive (Green) StatusMesin === 'Hidup' โœ… ADDED
Mesin Mati power_off Negative (Red) StatusMesin === 'Mati' โœ… ADDED
Overspeed >50 km/h speed Warning (Orange) Kecepatan > 50 โœ… ADDED

๐Ÿ”ง 2. Implementation Details

Template Structure:

<!-- Statistics Cards --> <div v-if="!loading && !error" class="row q-gutter-md q-mb-xl"> <!-- Total Kendaraan --> <div class="col-12 col-sm-6 col-lg-3"> <q-card class="shadow-1 stats-card"> <q-card-section class="text-center"> <q-icon name="directions_car" color="primary" size="32px" /> <div class="text-h4 text-weight-bold text-primary">{{ totalVehicles }}</div> <div class="text-body2 text-grey-7">Total Kendaraan</div> </q-card-section> </q-card> </div> <!-- ... other cards --> </div>

Computed Properties:

// Total kendaraan const totalVehicles = computed(() => { return vehicles.value.length }) // Mesin hidup const engineOnCount = computed(() => { return vehicles.value.filter(vehicle => vehicle.StatusMesin === 'Hidup').length }) // Mesin mati const engineOffCount = computed(() => { return vehicles.value.filter(vehicle => vehicle.StatusMesin === 'Mati').length }) // Overspeed >50 km/h const overspeedCount = computed(() => { return vehicles.value.filter(vehicle => { const speed = parseFloat(vehicle.Kecepatan) || 0 return speed > 50 }).length })

๐Ÿงช 3. Test Scenarios

Scenario 1: Sample Data Calculation

Misalkan ada 10 kendaraan dengan data berikut:

Vehicle StatusMesin Kecepatan Contributes To
Vehicle 1 Hidup 45 km/h Total, Mesin Hidup
Vehicle 2 Hidup 65 km/h Total, Mesin Hidup, Overspeed
Vehicle 3 Mati 0 km/h Total, Mesin Mati
Vehicle 4 Hidup 80 km/h Total, Mesin Hidup, Overspeed
Vehicle 5 Mati 0 km/h Total, Mesin Mati

Expected Results:

10
Total Kendaraan
3
Mesin Hidup
2
Mesin Mati
2
Overspeed >50 km/h

Scenario 2: Edge Cases

Case Data Expected Result Status
No Vehicles vehicles = [] All counts = 0 โ˜ To Test
All Engines Off All StatusMesin = 'Mati' engineOnCount = 0 โ˜ To Test
All Engines On All StatusMesin = 'Hidup' engineOffCount = 0 โ˜ To Test
No Overspeed All Kecepatan โ‰ค 50 overspeedCount = 0 โ˜ To Test
All Overspeed All Kecepatan > 50 overspeedCount = totalVehicles โ˜ To Test

๐ŸŽจ 4. Visual Design

Card Layout:

Card Content:

Color Scheme:

Card Color Hex Code Usage
Total Kendaraan Primary #1976d2 General information
Mesin Hidup Positive #4caf50 Good status (engines on)
Mesin Mati Negative #f44336 Alert status (engines off)
Overspeed Warning #ff9800 Warning status (speed violation)

๐Ÿš€ 5. Testing Instructions

Step 1: Akses Customer Asset Page

  1. Login: Login Page
  2. Credentials: dayansgi / dayansgi123
  3. Navigate: Customer Asset Page

Step 2: Verifikasi Statistics Cards

What to Check How to Check Expected Result
Cards Position Look at top of page above vehicle cards 4 cards in a row (responsive layout)
Total Kendaraan Count vehicle cards below Number matches actual vehicle count
Mesin Hidup Count green status chips Number matches "Hidup" status count
Mesin Mati Count red status chips Number matches "Mati" status count
Overspeed Count vehicles with speed >50 km/h Number matches high speed vehicles

Step 3: Responsive Testing

Step 4: Data Accuracy

๐Ÿ”ง 6. Technical Implementation

Vue.js Computed Properties:

// Reactive calculations that update automatically const totalVehicles = computed(() => vehicles.value.length) const engineOnCount = computed(() => vehicles.value.filter(v => v.StatusMesin === 'Hidup').length ) const engineOffCount = computed(() => vehicles.value.filter(v => v.StatusMesin === 'Mati').length ) const overspeedCount = computed(() => vehicles.value.filter(v => parseFloat(v.Kecepatan) > 50).length )

Responsive Grid System:

<div class="row q-gutter-md q-mb-xl"> <div class="col-12 col-sm-6 col-lg-3"> <!-- Card content --> </div> </div>

Performance Considerations:

โœ… 7. Implementation Status

Feature Status Notes
Statistics Cards Layout โœ… IMPLEMENTED 4 cards in responsive grid
Total Kendaraan โœ… IMPLEMENTED Count of all vehicles
Mesin Hidup โœ… IMPLEMENTED Count of StatusMesin === 'Hidup'
Mesin Mati โœ… IMPLEMENTED Count of StatusMesin === 'Mati'
Overspeed >50 km/h โœ… IMPLEMENTED Count of Kecepatan > 50
Responsive Design โœ… IMPLEMENTED col-12 col-sm-6 col-lg-3
Real-time Updates โœ… IMPLEMENTED Computed properties auto-update

๐Ÿ“Š STATISTICS CARDS IMPLEMENTED!

4 statistics cards ditambahkan di atas vehicle cards dengan data real-time.

Test di: Customer Asset Page


Generated by: test_statistics_cards.php | Author: Rodhi | Date: 16/08/2026 12:13:12

Status: STATISTICS CARDS IMPLEMENTED - READY FOR TESTING