Files
eamco_office_frontend/src/pages/money/profit_year.vue
Edwin Eames 61f93ec4e8 Refactor frontend to Composition API and improve UI/UX
Major Changes:
- Migrate components from Options API to Composition API with <script setup>
- Add centralized service layer (serviceService, deliveryService, adminService)
- Implement new reusable components (EnhancedButton, EnhancedModal, StatCard, etc.)
- Add theme store for consistent theming across application
- Improve ServiceCalendar with federal holidays and better styling
- Refactor customer profile and tank estimation components
- Update all delivery and payment pages to use centralized services
- Add utility functions for formatting and validation
- Update Dockerfiles for better environment configuration
- Enhance Tailwind config with custom design tokens

UI Improvements:
- Modern, premium design with glassmorphism effects
- Improved form layouts with FloatingInput components
- Better loading states and empty states
- Enhanced modals and tables with consistent styling
- Responsive design improvements across all pages

Technical Improvements:
- Strict TypeScript types throughout
- Better error handling and validation
- Removed deprecated api.js in favor of TypeScript services
- Improved code organization and maintainability
2026-02-01 19:04:07 -05:00

102 lines
2.2 KiB
Vue

<!-- src/pages/money/profit_year.vue -->
<template>
<div class="flex">
<div class=" w-full px-10 ">
<div class="text-sm breadcrumbs mb-10">
<ul>
<li>
<router-link :to="{ name: 'home' }">
Home
</router-link>
</li>
<li>
<router-link :to="{ name: 'employee' }">
employees
</router-link>
</li>
</ul>
</div>
<div class="flex start pb-10 text-2xl">Profit for Year </div>
<div class="col-span-12 font-bold ">
Profit Year
</div>
<div class="col-span-12 mb-5 text-sm text-gray-500">
{{ profit_year }}
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import axios from 'axios'
import authHeader from '../../services/auth.header'
import Header from '../../layouts/headers/headerauth.vue'
import SideBar from '../../layouts/sidebar/sidebar.vue'
export default defineComponent({
name: 'MoneyYear',
components: {
Header,
SideBar,
},
data() {
return {
token: null,
user: null,
employees: [],
profit_year: 0,
}
},
created() {
this.userStatus()
},
mounted() {
this.get_profit_year()
},
methods: {
userStatus() {
let path = import.meta.env.VITE_BASE_URL + '/auth/whoami';
axios({
method: 'get',
url: path,
withCredentials: true,
headers: authHeader(),
})
.then((response: any) => {
if (response.data.ok) {
this.user = response.data.user;
}
})
.catch(() => {
this.user = null
})
},
get_profit_year() {
let path = import.meta.env.VITE_BASE_URL + '/money/profit/year';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
this.profit_year = response.data.total
})
},
},
})
</script>
<style scoped></style>