Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
feat: Update FlightView and PublicView components
Browse files Browse the repository at this point in the history
feat: Add HeaderComp to PageView and HomeView components

feat: Add ResizableTableComp to FlightView, TicketView, GoodsView, LuggageView, and TicketView components

fix: Update autoIncrement function parameter type to unknown

refactor: Remove unused imports in various components

feat: Update FlightDTO and FlightServiceImpl

feat: Add TitleComp to PublicView and RegisterView components

feat: Add TitleComp to LoginView component

feat: Add ResizableTableComp to AirlineView and MerchantView components

feat: Add ResizableTableComp to PassengerView and TicketView components

fix: Remove unused imports in FlightServiceImpl

style: flight
  • Loading branch information
SakuraPuare committed Jun 18, 2024
1 parent eba04ce commit 410c08a
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sakurapuare.flightmanagement.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Positive;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

@Service
public class FlightServiceImpl implements FlightService {
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const autoIncrement = (list: any[]): number => {
export const autoIncrement = (list: unknown[]): number => {
return list.length + 1;
};
1 change: 1 addition & 0 deletions web/src/views/auth/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { loginAPI } from "@/apis/auth";
import { useUserStore } from "@/stores/user";
import { LoginParams } from "@/types/auth/login";
import router from "@/utils/router";
import TitleComp from "@/components/TitleComp.vue";
const user = useUserStore();
Expand Down
1 change: 1 addition & 0 deletions web/src/views/auth/RegisterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
registerPassengerAPI,
registerStaffAPI,
} from "@/apis/auth";
import TitleComp from "@/components/TitleComp.vue";
const items = ["Passenger", "Merchant", "Airline", "Staff"];
let selectedIndex = ref(0);
Expand Down
1 change: 1 addition & 0 deletions web/src/views/home/airline/FlightView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
getFlightsListAPI,
updateFlightAPI,
} from "@/apis/flights";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down
1 change: 1 addition & 0 deletions web/src/views/home/airline/TicketView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { getFlightResponse } from "@/types/flight";
import { getFlightsListAPI } from "@/apis/flights";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/home/merchant/GoodsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from "@/types/goods";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down Expand Up @@ -169,7 +170,7 @@ const clean = () => {
onMounted(async () => {
allCount.value = await getTypesCountStatistic("goods");
getData(page.value);
await getData(page.value);
});
const headerlessHeight = ref(0);
onMounted(async () => {
Expand Down
5 changes: 3 additions & 2 deletions web/src/views/home/passenger/GoodsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { onMounted, ref, Ref } from "vue";
import { TableV2FixedDir } from "element-plus";
import { buyGoodsAPI, getGoodsListAPI } from "@/apis/goods";
import { getGoodsResponse } from "@/types/goods";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down Expand Up @@ -86,13 +87,13 @@ const getData = async (page: number) => {
const buy = async (id: number) => {
await buyGoodsAPI(id);
getData(page.value);
await getData(page.value);
};
onMounted(async () => {
allCount.value = await getTypesCountStatistic("goods");
getData(page.value);
await getData(page.value);
});
const headerlessHeight = ref(0);
onMounted(async () => {
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/home/passenger/LuggageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { onMounted, ref, Ref } from "vue";
import { getMyLuggagesListAPI } from "@/apis/luggages";
import { getLuggageResponse } from "@/types/luggage";
import { DateRender } from "@/utils/date";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down Expand Up @@ -72,7 +73,7 @@ const getData = async (page: number) => {
onMounted(async () => {
allCount.value = await getTypesCountStatistic("luggage");
getData(page.value);
await getData(page.value);
});
const headerlessHeight = ref(0);
onMounted(async () => {
Expand Down
7 changes: 4 additions & 3 deletions web/src/views/home/passenger/OrderView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { getHeightWithoutHeader } from "@/utils/responsive";
import { onMounted, Ref, ref } from "vue";
import { getOrderResponse } from "@/types/order";
import { TableV2FixedDir } from "element-plus";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down Expand Up @@ -166,18 +167,18 @@ const getData = async (page: number) => {
const pay = async (id: number) => {
await payOrderAPI(id);
getData(page.value);
await getData(page.value);
};
const cancel = async (id: number) => {
await cancelOrderAPI(id);
getData(page.value);
await getData(page.value);
};
onMounted(async () => {
allCount.value = await getTypesCountStatistic("order");
getData(page.value);
await getData(page.value);
});
const headerlessHeight = ref(0);
Expand Down
5 changes: 3 additions & 2 deletions web/src/views/home/passenger/TicketView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { DateRender } from "@/utils/date";
import { getHeightWithoutHeader } from "@/utils/responsive";
import { onMounted, ref, Ref } from "vue";
import { TableV2FixedDir } from "element-plus";
import ResizableTableComp from "@/components/ResizableTableComp.vue";
const columns = [
{
Expand Down Expand Up @@ -144,13 +145,13 @@ const getData = async (page: number) => {
const buy = async (id: number) => {
await createOrderAPI(id);
getData(page.value);
await getData(page.value);
};
onMounted(async () => {
allCount.value = await getTypesCountStatistic("ticket");
getData(page.value);
await getData(page.value);
});
const headerlessHeight = ref(0);
Expand Down
1 change: 1 addition & 0 deletions web/src/views/index/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { onMounted, Ref, ref, watch } from "vue";
import { getHeightWithoutHeader } from "@/utils/responsive";
import router from "@/utils/router";
import { MenuItem } from "@/types/types";
import HeaderComp from "@/components/HeaderComp.vue";
// if path = /home
const isAtHomePath = ref(router.currentRoute.value.path === "/home");
Expand Down
4 changes: 3 additions & 1 deletion web/src/views/index/PageView.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts" setup></script>
<script lang="ts" setup>
import HeaderComp from "@/components/HeaderComp.vue";
</script>

<template>
<HeaderComp />
Expand Down
2 changes: 2 additions & 0 deletions web/src/views/index/PublicView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
faShield,
faSuitcaseRolling,
} from "@fortawesome/free-solid-svg-icons";
import TitleComp from "@/components/TitleComp.vue";
import HeaderComp from "@/components/HeaderComp.vue";
</script>

<template>
Expand Down

0 comments on commit 410c08a

Please sign in to comment.