Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

レシート登録時にファイル名を動的生成 #871

Merged
merged 2 commits into from
Aug 11, 2024

Conversation

Kubosaka
Copy link
Collaborator

@Kubosaka Kubosaka commented Aug 11, 2024

resolve #870

概要

  • レシート登録時にファイル名を動的に生成するようにした
  • iphoneなどで写真を撮って登録する際、ファイル名はimage.pngになってしまうため、その対応

画面スクリーンショット等

  • URL
    スクリーンショット

テスト項目

  • minio上でレシートのファイル名が統一されているか
  • レシートの登録、変更、削除などの動作が問題ないか

備考

@Kubosaka Kubosaka requested a review from hikahana August 11, 2024 04:40
@Kubosaka Kubosaka self-assigned this Aug 11, 2024
Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作okです。
一点だけコメントしました


// 日付取得
const date = new Date();
const month = date.getMonth() < 10 ? '0' + date.getMonth() : date.getMonth();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const month = date.getMonth() < 10 ? '0' + date.getMonth() : date.getMonth();
const month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1);

0~11で1~12月を表しているらしいです。
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます
修正しました
[fix]今月を正しく出力する

Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kubosaka Kubosaka merged commit 6a53e08 into develop Aug 11, 2024
2 checks passed
@Kubosaka Kubosaka deleted the feat/kubosaka/870-change-receipt-file-name branch August 11, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

レシート登録時にファイル名の変更機能の実装
2 participants