This commit is contained in:
admin
2026-06-01 00:35:53 +09:00
parent 8c66d820c8
commit 91632ea5b6
7 changed files with 612 additions and 245 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -284,7 +284,20 @@
<body> <body>
<header> <header>
<h1>🏛 e-Gov 電子送達</h1> <h1>🏛 e-Gov 電子送達</h1>
<a class="back-link" href="index.html" style="display:inline-block;padding:6px 16px;background:#757575;color:#fff;border-radius:4px;text-decoration:none;font-size:14px;">← メニューへ戻る</a> <a
class="back-link"
href="index.html"
style="
display: inline-block;
padding: 6px 16px;
background: #757575;
color: #fff;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
"
>← メニューへ戻る</a
>
</header> </header>
<!-- ログインカード --> <!-- ログインカード -->

View File

@@ -3,7 +3,10 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta
http-equiv="Cache-Control"
content="no-cache, no-store, must-revalidate"
/>
<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" />
<title>NJTS 会計システム - メイン</title> <title>NJTS 会計システム - メイン</title>
<link rel="stylesheet" href="css/style.css" /> <link rel="stylesheet" href="css/style.css" />
@@ -92,41 +95,94 @@
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 13px;
} }
.change-pw-btn:hover { background: #545b62; } .change-pw-btn:hover {
background: #545b62;
}
/* パスワード変更モーダル */ /* パスワード変更モーダル */
.modal-overlay { .modal-overlay {
display: none; display: none;
position: fixed; position: fixed;
inset: 0; inset: 0;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
z-index: 1000; z-index: 1000;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.modal-overlay.active { display: flex; } .modal-overlay.active {
display: flex;
}
.modal-box { .modal-box {
background: white; background: white;
border-radius: 10px; border-radius: 10px;
padding: 32px; padding: 32px;
width: 360px; width: 360px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.modal-box h3 {
margin: 0 0 20px;
}
.modal-box .form-group {
margin-bottom: 14px;
}
.modal-box label {
display: block;
margin-bottom: 5px;
font-size: 13px;
font-weight: 600;
color: #333;
} }
.modal-box h3 { margin: 0 0 20px; }
.modal-box .form-group { margin-bottom: 14px; }
.modal-box label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: #333; }
.modal-box input[type="password"] { .modal-box input[type="password"] {
width: 100%; padding: 10px; border: 1px solid #ddd; width: 100%;
border-radius: 5px; font-size: 14px; box-sizing: border-box; padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 14px;
box-sizing: border-box;
}
.modal-box .btn-row {
display: flex;
gap: 10px;
margin-top: 20px;
}
.modal-box .btn-row button {
flex: 1;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
}
.modal-box .btn-submit {
background: #007bff;
color: white;
}
.modal-box .btn-submit:hover {
background: #0056b3;
}
.modal-box .btn-cancel {
background: #e9ecef;
color: #333;
}
.modal-box .btn-cancel:hover {
background: #d0d5db;
}
.modal-msg {
padding: 8px 12px;
border-radius: 4px;
margin-bottom: 12px;
display: none;
font-size: 13px;
}
.modal-msg.error {
background: #fee;
color: #c33;
border: 1px solid #fcc;
}
.modal-msg.success {
background: #efe;
color: #3a3;
border: 1px solid #cfc;
} }
.modal-box .btn-row { display: flex; gap: 10px; margin-top: 20px; }
.modal-box .btn-row button { flex: 1; padding: 10px; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; }
.modal-box .btn-submit { background: #007bff; color: white; }
.modal-box .btn-submit:hover { background: #0056b3; }
.modal-box .btn-cancel { background: #e9ecef; color: #333; }
.modal-box .btn-cancel:hover { background: #d0d5db; }
.modal-msg { padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; display: none; font-size: 13px; }
.modal-msg.error { background: #fee; color: #c33; border: 1px solid #fcc; }
.modal-msg.success { background: #efe; color: #3a3; border: 1px solid #cfc; }
</style> </style>
</head> </head>
<body> <body>
@@ -134,7 +190,9 @@
<h1>NJTS</h1> <h1>NJTS</h1>
<div class="user-info"> <div class="user-info">
<span>ユーザー: <strong id="username">読み込み中...</strong></span> <span>ユーザー: <strong id="username">読み込み中...</strong></span>
<button class="change-pw-btn" onclick="openChangePw()">パスワード変更</button> <button class="change-pw-btn" onclick="openChangePw()">
パスワード変更
</button>
<button class="logout-btn" onclick="logout()">ログアウト</button> <button class="logout-btn" onclick="logout()">ログアウト</button>
</div> </div>
</header> </header>
@@ -146,7 +204,11 @@
<div class="modal-msg" id="changePwMsg"></div> <div class="modal-msg" id="changePwMsg"></div>
<div class="form-group"> <div class="form-group">
<label>現在のパスワード</label> <label>現在のパスワード</label>
<input type="password" id="cpCurrent" placeholder="現在のパスワード" /> <input
type="password"
id="cpCurrent"
placeholder="現在のパスワード"
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>新しいパスワード8文字以上</label> <label>新しいパスワード8文字以上</label>
@@ -157,8 +219,12 @@
<input type="password" id="cpConfirm" placeholder="もう一度入力" /> <input type="password" id="cpConfirm" placeholder="もう一度入力" />
</div> </div>
<div class="btn-row"> <div class="btn-row">
<button class="btn-submit" onclick="submitChangePw()">変更する</button> <button class="btn-submit" onclick="submitChangePw()">
<button class="btn-cancel" onclick="closeChangePw()">キャンセル</button> 変更する
</button>
<button class="btn-cancel" onclick="closeChangePw()">
キャンセル
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -198,7 +264,9 @@
銀行のCSVデータを取込み、明細を管理します。重複チェック付きで安全に取込め、月別・銀行別の検索・印刷が可能です。 銀行のCSVデータを取込み、明細を管理します。重複チェック付きで安全に取込め、月別・銀行別の検索・印刷が可能です。
</p> </p>
<p> <p>
<a class="btn" href="bank-statement.html" style="background: #1565c0">銀行明細を開く</a> <a class="btn" href="bank-statement.html" style="background: #1565c0"
>銀行明細を開く</a
>
</p> </p>
</section> </section>
@@ -245,28 +313,40 @@
} }
async function submitChangePw() { async function submitChangePw() {
const current = document.getElementById("cpCurrent").value; const current = document.getElementById("cpCurrent").value;
const newPw = document.getElementById("cpNew").value; const newPw = document.getElementById("cpNew").value;
const confirm = document.getElementById("cpConfirm").value; const confirm = document.getElementById("cpConfirm").value;
const user = getCurrentUser(); const user = getCurrentUser();
if (!current || !newPw || !confirm) { if (!current || !newPw || !confirm) {
showChangePwMsg("すべての項目を入力してください", true); return; showChangePwMsg("すべての項目を入力してください", true);
return;
} }
if (newPw.length < 8) { if (newPw.length < 8) {
showChangePwMsg("新しいパスワードは8文字以上にしてください", true); return; showChangePwMsg("新しいパスワードは8文字以上にしてください", true);
return;
} }
if (newPw !== confirm) { if (newPw !== confirm) {
showChangePwMsg("新しいパスワードが一致しません", true); return; showChangePwMsg("新しいパスワードが一致しません", true);
return;
} }
try { try {
const res = await fetch("/api/users/change-password", { const res = await fetch("/api/users/change-password", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username: user.username, current_password: current, new_password: newPw }) body: JSON.stringify({
username: user.username,
current_password: current,
new_password: newPw,
}),
}); });
const data = await res.json(); const data = await res.json();
if (res.ok) { if (res.ok) {
showChangePwMsg("パスワードを変更しました。再ログインしてください", false); showChangePwMsg(
setTimeout(() => { logout(); }, 2000); "パスワードを変更しました。再ログインしてください",
false,
);
setTimeout(() => {
logout();
}, 2000);
} else { } else {
showChangePwMsg(data.detail || "変更に失敗しました", true); showChangePwMsg(data.detail || "変更に失敗しました", true);
} }
@@ -274,7 +354,6 @@
showChangePwMsg("エラー: " + e.message, true); showChangePwMsg("エラー: " + e.message, true);
} }
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -257,7 +257,20 @@
</style> </style>
</head> </head>
<body> <body>
<a href="index.html" style="display:inline-block;margin:0 0 20px 0;padding:6px 16px;background:#757575;color:#fff;border-radius:4px;text-decoration:none;font-size:14px;">← メニューへ戻る</a> <a
href="index.html"
style="
display: inline-block;
margin: 0 0 20px 0;
padding: 6px 16px;
background: #757575;
color: #fff;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
"
>← メニューへ戻る</a
>
<h2>仕訳入力</h2> <h2>仕訳入力</h2>
<div class="row" style="margin-bottom: 12px"> <div class="row" style="margin-bottom: 12px">

View File

@@ -56,7 +56,20 @@
> >
保存 保存
</button> </button>
<a href="index.html" style="display:inline-block;margin:0 0 20px 0;padding:6px 16px;background:#757575;color:#fff;border-radius:4px;text-decoration:none;font-size:14px;">← メニューへ戻る</a> <a
href="index.html"
style="
display: inline-block;
margin: 0 0 20px 0;
padding: 6px 16px;
background: #757575;
color: #fff;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
"
>← メニューへ戻る</a
>
<script src="js/api.js"></script> <script src="js/api.js"></script>
<script src="js/opening_balance.js"></script> <script src="js/opening_balance.js"></script>

View File

@@ -56,7 +56,19 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<a href="index.html" style="display:inline-block;padding:6px 16px;background:#757575;color:#fff;border-radius:4px;text-decoration:none;font-size:14px;">← メニューへ戻る</a> <a
href="index.html"
style="
display: inline-block;
padding: 6px 16px;
background: #757575;
color: #fff;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
"
>← メニューへ戻る</a
>
<h1>給与管理システム</h1> <h1>給与管理システム</h1>
<p>従業員の給与計算、扶養管理、保険料・税金の管理を行います</p> <p>従業員の給与計算、扶養管理、保険料・税金の管理を行います</p>

View File

@@ -267,7 +267,20 @@
</style> </style>
</head> </head>
<body> <body>
<a href="index.html" style="display:inline-block;margin:0 0 20px 0;padding:6px 16px;background:#757575;color:#fff;border-radius:4px;text-decoration:none;font-size:14px;">← メニューへ戻る</a> <a
href="index.html"
style="
display: inline-block;
margin: 0 0 20px 0;
padding: 6px 16px;
background: #757575;
color: #fff;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
"
>← メニューへ戻る</a
>
<h2>残高試算表(貸借・損益)</h2> <h2>残高試算表(貸借・損益)</h2>