feat: [pmis] 출면일보 CRUD 구현

- 일별 출면일보 마스터 + 인원/장비 3테이블 마이그레이션
- 캘린더 스트립 (1~31일) 날짜 선택 및 상태 닷 표시
- 인원/장비 탭 CRUD (추가/수정/삭제/번개 랜덤데이터)
- 검토자 확인 모달 (조직도 + 검색 + 검토라인)
- 양식보기 모달 (출면일보/장비일보 인쇄 양식)
- 날씨/특이사항/상태 업데이트 API
This commit is contained in:
김보곤
2026-03-12 16:43:36 +09:00
parent 28ca8d05d3
commit 6c968dbb6f
9 changed files with 1333 additions and 25 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('pmis_daily_attendances', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id')->index();
$table->date('date')->comment('일자');
$table->string('company_name', 200)->default('')->comment('업체명');
$table->string('weather', 50)->default('맑음')->comment('날씨');
$table->enum('status', ['draft', 'review', 'approved'])->default('draft')->comment('상태');
$table->text('notes')->nullable()->comment('특이사항');
$table->json('options')->nullable()->comment('검토자 등 부가정보');
$table->timestamps();
$table->softDeletes();
$table->unique(['tenant_id', 'date', 'company_name'], 'pmis_attendance_unique');
});
}
public function down(): void
{
Schema::dropIfExists('pmis_daily_attendances');
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('pmis_attendance_workers', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id')->index();
$table->unsignedBigInteger('attendance_id')->index();
$table->string('work_type', 200)->comment('공종');
$table->string('job_type', 200)->comment('직종');
$table->string('name', 100)->comment('성명');
$table->decimal('man_days', 5, 1)->default(1.0)->comment('공수');
$table->decimal('amount', 14, 0)->default(0)->comment('금액');
$table->string('work_content', 500)->default('')->comment('작업내용');
$table->integer('sort_order')->default(0);
$table->json('options')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('attendance_id')->references('id')->on('pmis_daily_attendances')->onDelete('cascade');
});
}
public function down(): void
{
Schema::dropIfExists('pmis_attendance_workers');
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('pmis_attendance_equipments', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tenant_id')->index();
$table->unsignedBigInteger('attendance_id')->index();
$table->string('equipment_name', 200)->comment('장비명');
$table->string('specification', 300)->default('')->comment('규격');
$table->string('equipment_number', 100)->default('')->comment('장비번호');
$table->string('operator', 100)->default('')->comment('운전원');
$table->decimal('man_days', 5, 1)->default(1.0)->comment('공수');
$table->string('work_content', 500)->default('')->comment('작업내용');
$table->integer('sort_order')->default(0);
$table->json('options')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('attendance_id')->references('id')->on('pmis_daily_attendances')->onDelete('cascade');
});
}
public function down(): void
{
Schema::dropIfExists('pmis_attendance_equipments');
}
};