Changes
23 changed files (+350/-698)
-
-
@@ -44,6 +44,6 @@ indent_style = spaceindent_size = 4 # Zig は正しくタブ文字を扱えない。 [*.zig] [*.{zig,zon}] indent_style = space indent_size = 4
-
-
-
@@ -22,3 +22,6 @@ elm-stuff# What: Zig のビルド成果物。 zig-out # What: ダウンロードされた Zig の外部パッケージ。 zig-pkg
-
-
-
@@ -1,5 +1,5 @@# SPDX-License-Identifier: AGPL-3.0-only # Copyright 2025 Shota FUJI # Copyright 2026 Shota FUJI # # This program is free software: you can redistribute it and/or modify it under the terms # of the GNU Affero General Public License as published by the Free Software Foundation,
-
@@ -12,5 +12,9 @@# You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # What: mkdocs のビルド生成物。 site/ :8081 { encode root * zig-out try_files {path} /index.html file_server }
-
-
docs/build.zig (new)
-
@@ -0,0 +1,81 @@// SPDX-License-Identifier: AGPL-3.0-only // Copyright 2026 Shota FUJI // // This program is free software: you can redistribute it and/or modify it under the terms // of the GNU Affero General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A // PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License along // with this program. If not, see <http://www.gnu.org/licenses/>. const builtin = @import("builtin"); const std = @import("std"); const pages: []const []const u8 = @import("./pages.zon"); pub fn build(b: *std.Build) !void { const pandoc_exe = pandoc_exe: { const dep = if (builtin.os.tag == .linux and builtin.cpu.arch == .x86_64) b.lazyDependency("pandoc_linux_amd64", .{}) orelse return else { @panic("このホスト用の pandoc が用意できません。 build.zig.zon と build.zig を編集してホストを追加してください。"); }; break :pandoc_exe dep.path("bin/pandoc"); }; const dist = dist: { const dir = b.addWriteFiles(); for (pages) |page| { if (!std.mem.startsWith(u8, page, "src/")) { @panic(b.fmt("ページファイルは src/ 配下に置いてください: {s}", .{page})); } const ext = std.fs.path.extension(page); const format = format: { if (std.mem.eql(u8, ext, ".md")) { break :format "gfm"; } if (std.mem.eql(u8, ext, ".adoc")) { break :format "asciidoc"; } @panic(b.fmt("{s} ファイルは読み込めません: {s}", .{ ext, page })); }; const pandoc = std.Build.Step.Run.create(b, "pandoc"); pandoc.addFileArg(pandoc_exe); pandoc.addArgs(&.{ "--from", format }); pandoc.addArg("--to=html"); pandoc.addArg("--standalone"); pandoc.addFileArg(b.path(page)); const output = pandoc.addPrefixedOutputFileArg("--output=", "out.html"); _ = dir.addCopyFile(output, b.fmt("{s}.html", .{page["src/".len .. page.len - ext.len]})); } break :dist dir; }; // デフォルトインストール { const install = b.addInstallDirectory(.{ .source_dir = dist.getDirectory(), .install_dir = .{ .custom = "" }, .install_subdir = "", }); b.default_step.dependOn(&install.step); } }
-
-
docs/build.zig.zon (new)
-
@@ -0,0 +1,27 @@// SPDX-License-Identifier: AGPL-3.0-only // Copyright 2026 Shota FUJI // // This program is free software: you can redistribute it and/or modify it under the terms // of the GNU Affero General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A // PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License along // with this program. If not, see <http://www.gnu.org/licenses/>. .{ .name = .yamori_docs, .version = "0.1.0", .dependencies = .{ .pandoc_linux_amd64 = .{ .url = "https://github.com/jgm/pandoc/releases/download/3.10/pandoc-3.10-linux-amd64.tar.gz", .hash = "N-V-__8AAC8hrgnhkHpOpFCmzuDlCqmH3HCFK-BMWuu2qcxU", .lazy = true, }, }, .fingerprint = 0xea765511a11a1f1c, .paths = .{"."}, }
-
-
docs/default.nix (new)
-
@@ -0,0 +1,80 @@# SPDX-License-Identifier: AGPL-3.0-only # Copyright 2025 Shota FUJI # # This program is free software: you can redistribute it and/or modify it under the terms # of the GNU Affero General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. { stdenvNoCC, lib, zig_0_16, runCommand, }: stdenvNoCC.mkDerivation { name = "yamori-docs"; nativeBuildInputs = [ zig_0_16 ]; src = with lib.fileset; toSource { root = ./.; fileset = unions [ ./src ./pages.zon ./build.zig ./build.zig.zon ]; }; # nixpkgs の Zig ビルド hook が "standardTargetOptions" や "standardOptimizeOption" # で追加されるオプションをハードコードしてしまっているため、上書きしないと未定義の # オプションとしてエラーになってしまう。 dontSetZigDefaultFlags = true; postConfigure = let # nixpkgs の zig.fetchDeps は v0.16 に対応していない。 # この関数はそれを v0.16 に対応させたもの。 deps = runCommand "yamori-fetch-deps" { src = with lib.fileset; toSource { root = ./.; fileset = unions [ ./build.zig ./build.zig.zon ]; }; nativeBuildInputs = [ zig_0_16 ]; outputHashAlgo = null; outputHashMode = "recursive"; outputHash = "sha256-7bp8DTDiFeNJ2nxN8vVuVHXBCoOkPlellsEboGh2zWk="; } '' export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d) runHook unpackPhase cd $sourceRoot zig build --fetch=all mv zig-pkg $out ''; in '' ln -s ${deps} zig-pkg ''; }
-
-
docs/deps.nix (new)
-
@@ -0,0 +1,17 @@# generated by zon2nix (https://github.com/nix-community/zon2nix) { linkFarm, fetchzip, fetchgit, }: linkFarm "zig-packages" [ { name = "N-V-__8AAC8hrgnhkHpOpFCmzuDlCqmH3HCFK-BMWuu2qcxU"; path = fetchzip { url = "https://release-assets.githubusercontent.com/github-production-release-asset/571770/ebbf9037-95f4-4db8-b303-ad73d8638425?sp=r&sv=2018-11-09&sr=b&spr=https&se=2026-06-07T10%3A51%3A27Z&rscd=attachment%3B+filename%3Dpandoc-3.10-linux-amd64.tar.gz&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2026-06-07T09%3A51%3A14Z&ske=2026-06-07T10%3A51%3A27Z&sks=b&skv=2018-11-09&sig=PNCIOljlg%2BDc9D%2BLSPEdmeZOtJPboxhJb4%2BN65I8bgI%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc4MDgyOTIyNiwibmJmIjoxNzgwODI3NDI2LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.kVK1eN0doe0X3ESLftiKnodUmVafhG9HK4Mhw2FqvyE&response-content-disposition=attachment%3B%20filename%3Dpandoc-3.10-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream"; hash = "sha256-9SY0nBFsUSyxmZjOtsGctgZMKSYPMjkuzjIoaNVYBeM="; }; } ]
-
-
docs/mkdocs.yml (deleted)
-
@@ -1,62 +0,0 @@# SPDX-License-Identifier: AGPL-3.0-only # Copyright 2025 Shota FUJI # # This program is free software: you can redistribute it and/or modify it under the terms # of the GNU Affero General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. site_name: "Yamori ユーザガイド" docs_dir: "src" use_directory_urls: false nav: - index.md - about.md - file-types.md - getting-started.md - 仕様: - spec/provision-table.md - spec/workers.md - spec/work-record.md - spec/provision-override.md theme: name: material language: ja palette: - media: "(prefers-color-scheme)" toggle: icon: material/brightness-auto name: Switch to light mode - media: "(prefers-color-scheme: light)" scheme: default toggle: icon: material/brightness-7 name: Switch to dark mode - media: "(prefers-color-scheme: dark)" scheme: slate toggle: icon: material/brightness-4 name: Switch to system preference markdown_extensions: - toc: slugify: !!python/object/apply:pymdownx.slugs.slugify kwds: case: lower - admonition - abbr - footnotes - pymdownx.superfences: preserve_tabs: true - pymdownx.tabbed: alternate_style: true - pymdownx.keys
-
-
docs/package.nix (deleted)
-
@@ -1,41 +0,0 @@# SPDX-License-Identifier: AGPL-3.0-only # Copyright 2025 Shota FUJI # # This program is free software: you can redistribute it and/or modify it under the terms # of the GNU Affero General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. { stdenvNoCC, lib, python313Packages, }: stdenvNoCC.mkDerivation { name = "yamori-docs"; nativeBuildInputs = [ # Project documentation with Markdown / static website generator # https://www.mkdocs.org/ python313Packages.mkdocs # Material for mkdocs # https://squidfunk.github.io/mkdocs-material/ python313Packages.mkdocs-material ]; src = lib.sourceByRegex ./. [ "^src.*" "mkdocs.yml" ]; buildPhase = '' mkdocs build --strict -d $out ''; }
-
-
docs/pages.zon (new)
-
@@ -0,0 +1,20 @@// SPDX-License-Identifier: AGPL-3.0-only // Copyright 2026 Shota FUJI // // This program is free software: you can redistribute it and/or modify it under the terms // of the GNU Affero General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A // PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License along // with this program. If not, see <http://www.gnu.org/licenses/>. .{ "src/index.adoc", "src/about.adoc", "src/getting-started.adoc", "src/admin/overview.adoc", }
-
-
docs/src/about.adoc (new)
-
@@ -0,0 +1,41 @@= Yamori について //// SPDX-License-Identifier: AGPL-3.0-only Copyright 2026 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. //// Yamori は年次有給休暇の管理をサポートするオープンソース{empty}footnote:[https://www.gnu.org/licenses/agpl-3.0.ja.html:[AGPL 3.0] でライセンスされています。]ソフトウェアです。 Web アプリケーションとして動作し、管理者・使用者・労働者によるログインや柔軟な権限管理が行えます。 == 特徴 - Web アプリケーションのため、幅広い OS やデバイスで利用できます。 - 限りなく柔軟でシンプルなアクセス制御システムにより、導入する組織に特化したユーザ・権限管理が実現できます。 - 機能を年次有給休暇の管理に絞っているため、既存の勤怠管理を変えることなく導入できます。 == 動作環境 サーバとクライアント (ブラウザ) で動作環境は異なります。 === クライアント 記載されていないブラウザでも動作する場合があります。 - Mozilla Firefox: https://www.firefox.com/ja/browsers/enterprise/:[ESR] 最新1バージョン - Google Chrome: https://support.google.com/chrome/a/answer/12239814?hl=ja:[ChromeOS LTS チャンネル]最新1バージョン相当 === サーバ - Linux (カーネル要件は現在未定義)
-
-
docs/src/about.md (deleted)
-
@@ -1,54 +0,0 @@# Yamori について <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> Yamori は年次有給休暇の計算と検証、可視化を行うオープンソース[^0]ソフトウェアです。 勤怠が記録されたファイルや社員データファイルを読み込み、年次有給休暇を何日取得したか、何日残っているか、出勤率が八割を下回っていないかなどを自動で計算します。 [^0]: [AGPL 3.0](https://www.gnu.org/licenses/agpl-3.0.ja.html) でライセンスされています。 ## 特徴 一般的な勤怠システム・ソフトウェアと異なり、Yamori は入力インターフェイスを持っていません。 社員の名前や ID 、初回付与日、勤怠といった「事実」や「記録」は全てユーザがファイルに入力します。 そのため、ファイルの書式はユーザがそのまま見てもわかりやすいものとなっており、Yamori 以外の外部プログラムからのアクセスも容易です。 !!! info "ファイルの種類" 利用可能なファイルの種類は[ファイル形式](./file-types.md)ページにまとまっています。 Yamori を起動すると、ユーザが入力した「事実」や「記録」を全て読み込み、年次有給休暇の取得日数や法令違反のリスクといった「集計」や集計に基づく「状況」を表示します。 ユーザデータが通常の一般ファイルであるためベンダーロックインが発生せず、移行や連携がしやすいのが大きな特徴となります。 また、ソースコードが公開されていることに加えネットワーク通信が不要[^1]なことから、セキュリティ上のリスクがクラウドサービスと比べて圧倒的に低くなります。 [^1]: Yamori はローカルソフトウェアです。インターネットや LAN がない状況でも完全に機能します。 ## 利用方法 Yamori のデスクトップアプリケーションをダウンロードし実行します。 サポートされる OS は以下のとおりです。 - macOS Catalina 10.15 以降 - Windows 10, 11 - Linux !!! note "準備中" ダウンロードページは現在準備中です。
-
-
-
@@ -0,0 +1,49 @@= 管理者向け概要 //// SPDX-License-Identifier: AGPL-3.0-only Copyright 2026 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. //// == 全体構成 Yamori はブラウザ上で動作する SPA 、 SPA 向けの静的ファイルと HTTP API を提供するサーバから成り立ちます。 サーバは SQLite3 データベースにアプリケーションデータを読み書きします。 HTTP/1.1 で配信されるため**必ず前段に HTTP/2 or HTTP/3 のプロキシを置いてください**。 == アクセス制御 アクセス制御は全て https://webassembly.org/:[WebAssembly] プログラムとしてサーバに登録されます。 HTTP リクエストが来るとサーバは対応する WebAssembly ファイル・関数を実行して返り値を基にアクセスの許可・拒否を行います。 関数は https://flatbuffers.dev/:[FlatBuffers] のバイト文字列を受け取ります。 FlatBuffers のメッセージにはログインユーザとリクエスト、サーバの状態を含むコンテキストオブジェクトが含まれています。 [source,zig] ---- // users-api-acl-wasm.zig export fn allowV1GetUsers(buffer_ptr: [*]const u8, buffer_len: u32) bool { const buffer = buffer_ptr[0..buffer_len]; const root = flatbuffers.decodeRoot( yamori_users_acl.V1GetUsers, buffer, ) catch return false; if (getAttribute(root.user.attributes, "role")) |attr| { return std.mem.eql(u8, attr, "admin"); } return false; } ----
-
-
docs/src/assets/勤怠マスタ.xlsx (deleted)
-
docs/src/file-types.md (deleted)
-
@@ -1,65 +0,0 @@# ファイル形式 <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> Yamori では以下の形式のファイルが利用できます。 - [Excel ワークブック](#excel-ワークブック) - [CSV](#csv) - [TSV](#tsv) ファイル内の構造やファイル名が仕様に沿っている限り、どのデータにどのファイル形式を利用するのかは自由です。 ## Excel ワークブック Microsoft Excel のワークブック (`.xlsx`) です。 シート単位で読み込むため、一つのワークブックに複数のデータを含めることも可能です。 (例: 社員マスタと勤怠記録を同じワークブックで管理する) !!! note "確認中" どの Excel バージョンのワークブックまで読み込めるかは現在確認中です。 ## CSV カンマ (`,`) で列を区切り、改行 (CR+LF) で行が区切られたテキストファイルです。 文字コードは UTF-8 のみサポートしています。 **最初のヘッダ行は必須です**。 CSV に対応したソフトウェア・システムと連携させる場合に便利です。 ファイルは[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180)に準拠している必要があります。 (`text/csv;charset=utf-8`) *[CSV]: Comma-Separated Values ## TSV タブ文字 ( ++tab++ で入力できる空白文字)で列を区切り、改行 (LFまたはCR+LF) で行が区切られたテキストファイルです。 文字コードは UTF-8 のみサポートしています。 Yamori のデータファイルを読み込むプログラムを書く場合に便利です。 ファイルは [IANA に登録されている定義](https://www.iana.org/assignments/media-types/text/tab-separated-values)に準拠している必要があります。 (`text/tab-separated-values;charset=utf-8`) *[TSV]: Tab-Separated Values ## 将来サポート予定のファイル形式 - マクロ有効 Excel ワークブック (`.xlsm`) - JSON (`.json`, `.jsonc`)
-
-
-
@@ -1,5 +1,8 @@= スタートガイド //// SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI Copyright 2026 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation,
-
@@ -11,3 +14,8 @@ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. //// このページでは Yamori のサーバセットアップから最初の労働者ユーザ登録までの手順をチュートリアル形式で説明します。 NOTE: 準備中
-
-
docs/src/getting-started.md (deleted)
-
@@ -1,30 +0,0 @@# スタートガイド <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> このページでは Yamori をインストールしたあとのステップをチュートリアル形式で紹介します。 ## マスタファイルの作成 まずはじめに労働者情報を入力しましょう。 以下からテンプレート用ファイルをダウンロードして適当なフォルダに配置します。 - <a href="../assets/勤怠マスタ.xlsx" download="勤怠マスタ.xlsx">勤怠マスタ.xlsx</a> ワークブック内の「労働者一覧」シートに労働者の ID、名前、初回付与日(入社日の六ヶ月後が多いです)を入力してください。 初回付与日を入力したら次列にて年次有給休暇の日数を計算する際の付与テーブルを選んでください。
-
-
-
@@ -1,8 +1,8 @@# はじめに = はじめに <!-- //// SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI Copyright 2026 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation,
-
@@ -14,12 +14,10 @@ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> //// このドキュメントは年次有給休暇計算ソフトウェア "Yamori" の取り扱い説明書です。 - [Yamori について](./about.md) - [ファイル形式](./file-types.md) - [スタートガイド](./getting-started.md) - [仕様](./spec/work-record.md) - [ソースコード](https://git.pocka.jp/yamori.git/tree/master/) - link:about.html[Yamori について] - link:getting-started.html[スタートガイド] - link:admin/overview.html[管理者向け概要]
-
-
docs/src/spec/provision-override.md (deleted)
-
@@ -1,84 +0,0 @@# 付与上書きログ <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> 付与上書きログファイルでは自動的に計算される年次有給休暇の付与を手動で上書きすることができます。 例えば、 - Yamori を導入する時点での年次有給休暇の残日数に調整する場合 - 8 割出勤を満たさなかったが一定日数付与する場合 - 何らかの理由で付与日をずらす必要がある場合 などに、特定の日付の付与をなかったことにすることや、逆に本来付与日ではない日に付与を行ったことにできます。 !!! example "例" | 社員 ID | 日付 | 付与日数 | | ------- | ---------- | -------- | | A01 | 2025-07-01 | 0 | | A01 | 2025-07-08 | 10 | [社員 ID](#社員-id) と[日付](#日付)が同じ行が存在する場合は処理が中断されます。 過去の上書きログに変更を行う場合は、対象の行を直接更新してください。 ## 読み込み条件 ファイル名もしくは Excel ブックのシート名に `付与上書き` という文字列が*含まれている*場合、そのファイルもしくはシートを付与上書きログとして読み込みます。 書式が異なる・不正なデータが存在する場合は処理が中断されます。 ## 列の種類 付与上書きログの列は全て必須です。 列の順番は問いません。 ### 社員 ID [社員マスタ](./workers.md) で定義した社員 ID です。 存在しない社員 ID が見つかった場合は処理結果ログに警告として出力されます。 社員 ID として扱われる列名は[社員マスタ#社員 ID](./workers.md#社員-id) を参照してください。 ### 日付 上書きする対象の日付です。 日付のほかに、 `n回目` (例: `2回目`) とすることで `n` 回目の通常付与を行う日を指定することができます。 <!-- TODO: 日付の書式に関する独立したページを作る --> 日付として扱われる列名は以下のとおりです。 - 日付 - 上書き日 - 対象日 ### 付与日数 上書きする日数です。 数値、もしくは `n日` (例: `10日`) という指定ができます。 通常付与日を 0日で上書きすると、その通常付与がなかったことになります。 付与のない日付に 0日を指定しても何も起きませんが、入力ミスの可能性を考慮して処理結果ログに警告として出力されます。 負数の入力はエラーとなり処理が中断されます。 年次有給休暇の行使実績を[勤怠記録](./work-record.md)に入力する、過去の付与日を 0日として上書きするなどしてください。 付与日数として扱われる列名は以下のとおりです。 - 付与日数 - 日数 - 上書き日数
-
-
docs/src/spec/provision-table.md (deleted)
-
@@ -1,125 +0,0 @@# 付与テーブル <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> 年次有給休暇の付与テーブル (以降「付与テーブル」) は年次有給休暇を付与するタイミングで何日付与するかを決定する、勤続年数と年次有給休暇の付与日数の対応表です。 !!! example "例" | 名前 | 1回目 | 2回目 | 3回目 | 4回目 | 5回目 | 6回目 | 7回目以降 | 適用開始日 | | ---- | ----- | ----- | ----- | ----- | ----- | ----- | --------- | ---------- | | 週5 | 10 | 11 | 12 | 14 | 16 | 18 | 20 | | | 週4 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | | | ... | ... | ... | ... | ... | ... | ... | ... | ... | !!! example "法定最低日数 (2025-08-02現在).csv" ```csv 名前,1回目,2回目,3回目,4回目,5回目,6回目,7回目以降,適用開始日 週5,10,11,12,14,16,18,20 週4,7,8,9,10,12,13,15 週3,5,6,6,8,9,10,11 週2,3,4,4,5,6,6,7 週1,1,2,2,2,3,3,3 ``` 各労働者にここで定義された付与テーブルのどれかを割り当てることで、システムが付与日数や残日数を計算できるようになります。 !!! warning "法令で最低日数が定められています" 付与テーブルを定義する際は法令で定められている最低日数を下回らないようにしましょう。 - [労働基準法 - 第三十九条 年次有給休暇](https://laws.e-gov.go.jp/law/322AC0000000049#Mp-Ch_4-At_39) - [労働基準法施工規則 - 第二十四条の三](https://laws.e-gov.go.jp/law/322M40000100023#Mp-At_24_3) - [厚生労働省発行リーフレット](https://www.mhlw.go.jp/new-info/kobetu/roudou/gyousei/dl/140811-3.pdf) 運用中に付与テーブルへの変更が必要になった場合、**既存の行の内容を変更しないでください**。 過去の計算も変わってしまうため、 [適用開始日](#適用開始日) を設定した新しい行を追加してください。 === "Excel ブック" 指定するフォルダ内のブックにシートを作成し、 1 行目に以下を貼り付けてください。 ファイル名やシート名の指定はありません。 ```tsv 名前 1回目 2回目 3回目 4回目 5回目 6回目 7回目以降 適用開始日 ``` 1 行目の内容によって付与テーブルかどうか判断するため、 **1 行目の内容は変更しないでください**。 === "CSV/TSV" 指定するフォルダ内にファイルを作成し、ヘッダ行に以下を貼り付けてください。 ファイル名の指定はありません。 === "CSV" ```csv 名前,1回目,2回目,3回目,4回目,5回目,6回目,7回目以降,適用開始日 ``` === "TSV" ```tsv 名前 1回目 2回目 3回目 4回目 5回目 6回目 7回目以降 適用開始日 ``` ヘッダ行の内容によって付与テーブルかどうか判断するため、 **ヘッダ行のテキストは変更しないでください**。 ## 列の種類 付与テーブルの列は `適用開始日` を除き全て必須です。 入力されていない列がある場合や、付与テーブルが一つも定義されていない場合は処理が中断されます。 ### 名前 付与テーブルの名前です。 労働者のマスタデータ内から参照するため、簡潔でわかりやすい名前にしましょう。 ### 1~6回目 各付与回に付与する日数です。 数字、もしくは数字 + `日` (例: `10日`) が指定できます。 ### 7回目以降 7 回目以降の付与日数です。 数字、もしくは数字 + `日` (例: `20日`) が指定できます。 7 回目以降も日数を増やしていく場合は付与日数の上書き機能を利用してください。 ### 適用開始日 ある時点から付与テーブルの内容を変更する場合に利用する列です。 運用中に付与テーブルに対して変更が必要な場合、その変更の適用開始日を入力してください。 !!! example "例" 例えば以下のような付与テーブルがある場合、 | 名前 | 1回目 | ... | 適用開始日 | | ---- | ----- | --- | ---------- | | 週5 | 10 | ... | | | 週4 | 7 | ... | | | 週5 | 11 | ... | 2025-09-01 | | ... | ... | ... | ... | 2025/08/31 に `週5` の労働者に対して 1 回目の年次有給休暇付与が行われた場合の日数は 10 日となり、 2025/09/01 に同様の付与が行われた場合は 11 日となります。 Yamori は過去のデータも再計算を行うため、直接付与テーブルを変更してしまうと過去の実績も変わってしまいます。 そのため、運用中に法令改正や会社の制度に変更があった場合は**必ず新しい行として追加してください**。
-
-
docs/src/spec/work-record.md (deleted)
-
@@ -1,80 +0,0 @@# 勤怠記録 <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> 労働者の出勤や欠勤といった "勤怠区分" を日付・労働者ごとに記録したデータです。 === "行列書式 (シフト表書式)" !!! example "例" | 社員 ID | 2025-07-01 | 2025-07-02 | 2025-07-03 | 2025-07-04 | ... | | ------- | ---------- | ---------- | ---------- | ------------ | --- | | A01 | 出勤 | 出勤 | 欠勤 | 年次有給休暇 | ... | | B01 | 公休 | 公 | 出 | 有休 | ... | === "行書式" !!! example "例" | 社員 ID | 日付 | 勤怠区分 | | ------- | ---------- | ------------ | | A01 | 2025-07-01 | 出勤 | | A01 | 2025-07-02 | 出勤 | | A01 | 2025-07-03 | 欠勤 | | A01 | 2025-07-04 | 年次有給休暇 | | B01 | 2025-07-01 | 公休 | | B01 | 2025-07-02 | 公 | | B01 | 2025-07-03 | 出 | | B01 | 2025-07-04 | 有休 | | ... | ... | ... | 勤怠記録の書式は[行書式](#行書式)と[行列書式 (シフト表書式)](#行列書式)の二種類があります。 組織や労働形態に応じて使いやすい書式を選んでください。 ## 行書式 行書式では労働者の一日の記録を行ごとに入力します。 他のプログラムで読み込む場合などには便利な反面、データをそのまま見る場合には冗長で一覧性が低いという欠点があります。 Yamori 以外の統計解析ソフトを使う、 CSV/TSV ファイルで記録するといった場合におすすめです。 ### 読み込み条件 以下の条件をすべて満たす場合、そのファイルもしくはシートを行書式の勤怠記録として扱います。 - 一行目に社員 IDとして扱われる列名が存在する - 一行目に日付として扱われる列名が存在する - 一行目に勤怠区分として扱われる列名が存在する 定義されていない列は無視されます。 ## 行列書式 行列書式では行を労働者、列を日付とし、勤怠区分を交点に入力する二次元データです。 社員の勤務状況が一覧で見やすい反面、プログラムから読み込みにくいという欠点があります。 Yamori を使わずに勤怠一覧として参照することが多い、Excel のワークブックで記録するといった場合におすすめです。 ### 読み込み条件 以下の条件をすべて満たす場合、そのファイルもしくはシートを行列書式の勤怠記録として扱います。 - 一行一列目に社員 IDとして扱われる列名が入力されている - 一行目に有効な日付文字列が一列以上存在する 一列目を除き、一行目が有効な日付文字列ではない列は無視されます。
-
-
docs/src/spec/workers.md (deleted)
-
@@ -1,141 +0,0 @@# 社員マスタ <!-- SPDX-License-Identifier: AGPL-3.0-only Copyright 2025 Shota FUJI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> 社員の一覧を管理するファイルです。 !!! example "例" | 社員 ID | 名前 | 初回付与日 | 付与テーブル名 | 適用開始日 | | ------- | --------- | ---------- | -------------- | ---------- | | A01 | 田中 太郎 | 2020-01-01 | 週5 | | | B01 | 鈴木 花子 | 2020-01-01 | 週4 | | | B01 | 鈴木 花子 | 2020-01-01 | 週5 | 2022-02-22 | | ... | ... | ... | ... | ... | "田中 太郎" は 2020/01/01 を初回として "週5" の日数の年次有給休暇が付与されます。 "鈴木 花子" は 2020/01/01 を初回として 2022/02/21 までは "週4" として年次有給休暇が付与され、 2022/02/22 からは "週5" として付与されます。 運用中に社員マスタへの変更が必要になった場合、**既存の行の内容を変更しないでください**。 過去の計算も変わってしまうため、 [適用開始日](#適用開始日) を設定した新しい行を追加してください。 ## 読み込み条件 ファイル名もしくは Excel ブックのシート名に以下の文字列が*含まれている*場合、社員マスタとして読み込みます。 - 社員マスタ - 社員一覧 - 労働者マスタ - 労働者一覧 Excel ブックのファイル名の場合は含まれているシートを全て社員マスタとして読み込みます。 社員マスタ以外のシートが含まれる場合はファイル名を条件から外れるものにし、シート名に上記の文字列を含めてください。 ## 列の種類 以下の列は必須となります。 - [社員 ID](#社員-id) - [年次有給休暇初回付与日](#年次有給休暇初回付与日) - [年次有給休暇付与テーブル名](#年次有給休暇付与テーブル名) ### 社員 ID 労働者を一意に識別する文字列です。 社員番号などの実際の ID やランダムな文字列、ハンドルネームなど一意性が確保される限り書式は問いません。 重複する社員 ID が見つかった場合は処理が中断されます。 社員 ID として扱われる列名は以下のとおりです。 - 労働者ID - 労働者 ID - 社員ID - 社員 ID - 社員番号 - ID - id 上記の列名のうち 2 つ以上が同時に存在する場合、上記の表における表示順の高いものが優先して利用されます。 ### 名前 労働者の表示名です。 未指定の場合は [社員 ID](#社員-id) が表示されます。 名前として扱われる列名は以下のとおりです。 - 労働者名 - 社員名 - 表示名 - 名前 上記の列名のうち 2 つ以上が同時に存在する場合、上記の表における表示順の高いものが優先して利用されます。 ### 年次有給休暇初回付与日 この労働者に対して最初に有給休暇を付与する日付です。 法令では入社から半年以内に付与することが義務付けられています。 年次有給休暇初回付与日として扱われる列名は以下のとおりです。 - 年次有給休暇初回付与日 - 有給休暇初回付与日 - 初回付与日 <!-- TODO: 日付の書式に関する独立したページを作る --> 有効な日付の書式は以下となります。 - `YYYY-MM-DD` (例: `2013-05-26`) - `YYYY/MM/DD` (例: `2013/05/26`) - `YYYY/M/D` (例: `2013/5/26`) 時間も含まれている場合、時間部分は無視されます (切り捨て)。 時間とタイムゾーンが含まれている場合は実行コンピュータ上のタイムゾーンに換算してから時間を切り捨てます。 ### 年次有給休暇付与テーブル名 この労働者に有給休暇を付与する際の日数計算に用いるテーブルの名前です。 [年次有給休暇付与テーブル](./provision-table.md) で定義された[名前](./provision-table.md#名前)を指定してください。 年次有給休暇付与テーブル名として扱われる列名は以下のとおりです。 - 年次有給休暇付与テーブル名 - 有給休暇付与テーブル名 - 付与テーブル名 - 付与テーブル ### 適用開始日 ある時点から労働者の内容を変更する場合に利用する列です。 運用中に労働者に対して変更が必要な場合、その変更の適用開始日を入力してください。 !!! example "例" 週4 勤務の "鈴木 花子" が 2025/05/01 から週5 勤務に変わる場合、 | 社員 ID | 名前 | 初回付与日 | 付与テーブル名 | 適用開始日 | | ------- | --------- | ---------- | -------------- | ---------- | | B01 | 鈴木 花子 | 2020-01-01 | 週4 | | | B01 | 鈴木 花子 | 2020-01-01 | 週5 | 2025-05-01 | とすることで過去のデータに影響を与えることなく変更できます。 Yamori は過去のデータも再計算を行うため、社員マスタを変更してしまうと過去の実績も最新の労働者情報で計算されてしまいます。 そのため、運用中に労働者に対する変更を行う場合は、必ず変更後の情報を**新しい行として追加してください**。
-
-
-
@@ -40,7 +40,7 @@rec { packages = { demo = pkgs.callPackage ./demo { }; docs = pkgs.callPackage ./docs/package.nix { }; docs = pkgs.callPackage ./docs { }; }; formatter = pkgs.buildFHSEnv {
-
@@ -98,6 +98,11 @@type = "app"; program = "${server}/bin/mkdocs"; }; zon2nix = { type = "app"; program = pkgs.lib.getExe pkgs.zon2nix; }; }; devShell = pkgs.mkShell {
-
@@ -129,7 +134,8 @@# https://caddyserver.com/ caddy ] ++ packages.demo.nativeBuildInputs; ++ packages.demo.nativeBuildInputs ++ packages.docs.nativeBuildInputs; }; } );
-