Skip to content

Commit

Permalink
fixup! Reduce ESLint error
Browse files Browse the repository at this point in the history
  • Loading branch information
azuki774 committed Sep 10, 2024
1 parent 0d15f25 commit 39b02c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions components/PostRecord.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang='ts'>
import type { Category } from '@/interfaces'
const selector = ref<any>()
const selector = ref<unknown>()
const categoryList = ref<Category[]>()
const asyncData = await useFetch(
'/api/getCategories',
Expand Down Expand Up @@ -30,7 +30,7 @@ const priceBox = ref<number>()
const postButton = async (): Promise<void> => {
await useAsyncData(
`record`,
(): Promise<any> => {
(): Promise<unknown> => {
const send_category_id = selector.value.slice(0, 3) // 210-食費→210
const param = { price: priceBox.value, category_id: send_category_id }
const paramStr = '?price=' + param['price'] + '&category_id=' + param['category_id']
Expand Down
4 changes: 2 additions & 2 deletions components/ShowHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function showDeleteDialog(id: number): Promise<void> {
if (userResponse == true) {
await useAsyncData(
`record`,
(): Promise<any> => {
(): Promise<unknown> => {
const param = { id: id }
const paramStr = '?id=' + param['id']
const localurl = '/api/deleteRecord' + paramStr
Expand Down Expand Up @@ -52,7 +52,7 @@ async function showDeleteDialog(id: number): Promise<void> {
</tr>
</thead>
<tbody>
<tr v-for='record in recordList'>
<tr v-for='record in recordList' :key=record.id>
<td>{{ record.id }}</td>
<td>{{ record.category_name }}</td>
<td>{{ record.price }}</td>
Expand Down
5 changes: 1 addition & 4 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ const thisYear = today.getFullYear()
<template>
<section>
<h1>mawinter-front</h1>
<p text-alignment='center'>
<h2>登録</h2>
<PostRecord />
</p>

<div class='summary_link'>
<NuxtLink v-bind:to="{name: 'summary-year', params: {year: thisYear}}">
サマリー表示
</NuxtLink>
</div>

<p text-alignment='center'>
<h2>直近履歴</h2>
<ShowHistory />
</p>

</section>
</template>

Expand Down
7 changes: 3 additions & 4 deletions pages/summary/[year].vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ if (asyncData.data.value != undefined) {
</tr>
</thead>
<tbody>
<th scope='row'></th>
<tr v-if='fetched'>
<td>{{ AllSumList?.category_id }}</td>
<td>{{ AllSumList?.category_name }}</td>
Expand Down Expand Up @@ -273,7 +272,7 @@ if (asyncData.data.value != undefined) {
</tr>
</thead>
<tbody>
<tr v-for='income in incomeList'>
<tr v-for='income in incomeList' :key=income.id>
<td>{{ income.category_id }}</td>
<td>{{ income.category_name }}</td>
<td>
Expand Down Expand Up @@ -384,7 +383,7 @@ if (asyncData.data.value != undefined) {
</tr>
</thead>
<tbody>
<tr v-for='outgoing in outgoingList'>
<tr v-for='outgoing in outgoingList' :key=outgoing.id>
<td>{{ outgoing.category_id }}</td>
<td>{{ outgoing.category_name }}</td>
<td>
Expand Down Expand Up @@ -495,7 +494,7 @@ if (asyncData.data.value != undefined) {
</tr>
</thead>
<tbody>
<tr v-for='invest in investList'>
<tr v-for='invest in investList' :key=invest.id>
<td>{{ invest.category_id }}</td>
<td>{{ invest.category_name }}</td>
<td>
Expand Down

0 comments on commit 39b02c2

Please sign in to comment.