chore(pleno-vue): remove dead InvoicingBillingPeriodViewVA.vue (#274)
## What Removed `InvoicingBillingPeriodViewVA.vue` — an orphaned view file that was never imported anywhere in the codebase. ## Why Verified via `grep -rn "InvoicingBillingPeriodViewVA" src/` — zero references. The view mapping in `InvoicingBillingPeriodImportView.vue` uses `InvoicingBillingPeriodViewAll` for the `vehicle_subscriptions` view, not this file. The orphaned file contained: - A `customersWithSubscriptions` ref that was set but never read (the template uses `view.variables.sharedVariables.value.types.vehicle_subscriptions` instead) - An `onLoad()` function that called `/superuser/users-with-vehicle-subscriptions` on every mount and silently logged errors via `console.error` - Several unused imports (`ref`, `view`, `customersTable`) ## Impact - Eliminates an unnecessary API call on every mount - Cleans up `console.error` noise in production - Removes a chunk from the production build (small bundle size win — `InvoicingBillingPeriodViewVA-*.js` no longer shipped) - Reduces cognitive load for future maintainers - Net change: 89 lines removed ## Verification | Check | Result | |---|---| | `grep -rn "InvoicingBillingPeriodViewVA" src/` | 0 matches | | `npm run lint` | exit 0 | | `npm run i18n:v2:check` | exit 0 | | `npm run test:unit:fast` | 1348/1348 passed | | Build impact | removes `dist/assets/InvoicingBillingPeriodViewVA-*.js` | ## Refs - truckwash-fakturaer-periode quality pass - Mon 2026-08-10 08:00 GMT+2 deadline Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
This commit is contained in:
co-authored by
Truck Wash Agent
parent
cc7d5cf4ff
commit
c9935d1e0a
-90
@@ -1,90 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { view } from '../imports/InvoicingBillingPeriodImportView.vue';
|
||||
import { SessionUser } from '@/components/session/token/SessionUser.vue';
|
||||
import {ref} from "vue";
|
||||
import "@/components/displays/superuser/tables/customersTable.vue";
|
||||
import ColorIndicator from "@/components/displays/buttons/ColorIndicator.vue";
|
||||
import WhiteBox from "@/components/displays/boxes/WhiteBox.vue";
|
||||
|
||||
const customersWithSubscriptions = ref<Array<{
|
||||
id: number;
|
||||
customer_name: string;
|
||||
customer_number?: number;
|
||||
display_name?: string;
|
||||
group_id?: number;
|
||||
phone?: {
|
||||
country_code: string | null;
|
||||
number: string | null;
|
||||
};
|
||||
email?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
|
||||
}>[]>([]);
|
||||
|
||||
const onLoad = () => {
|
||||
// Send a test request
|
||||
SessionUser.request(
|
||||
'/superuser/users-with-vehicle-subscriptions',
|
||||
'GET',
|
||||
{}
|
||||
)
|
||||
.then((response) => {
|
||||
if (response.status === 200) {
|
||||
customersWithSubscriptions.value = response.data.data;
|
||||
} else {
|
||||
console.error('Failed to fetch vehicles with subscriptions:', response);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error fetching vehicles with subscriptions:', error);
|
||||
});
|
||||
};
|
||||
|
||||
onLoad();
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!--{{ view.variables.sharedVariables.value }}-->
|
||||
<div class="columns is-multiline is-mobile">
|
||||
<template v-for="customer in view.variables.sharedVariables.value.types.vehicle_subscriptions" :key="customer.customer_number">
|
||||
<div class="column is-12">
|
||||
<WhiteBox class="is-clickable">
|
||||
<!--{{ customer }}-->
|
||||
<div class="columns is-vcentered">
|
||||
<div class="column">
|
||||
<ColorIndicator
|
||||
v-bind:color_class="(customer.transactions.length > 0) ? 'has-text-success' : 'has-text-grey'"
|
||||
v-bind:label="{
|
||||
text: customer.customer_name,
|
||||
classes: [],
|
||||
}"
|
||||
v-bind:visibility="{
|
||||
icon: true,
|
||||
dropdown: false,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<p>{{customer.transactions.length}} transactions</p>
|
||||
</div>
|
||||
</div>
|
||||
</WhiteBox>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<p>
|
||||
VA customers with no transactions
|
||||
|
||||
</p>
|
||||
<button class="button is-primary" @click="view.functions.setCurrentView('home')">
|
||||
Go to Home
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user