DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# SUTERA 3.0 – Guide
|
||||
# MyKOPKB 1.0 – Guide
|
||||
|
||||
Welcome to **SUTERA 3.0**, the streamlined training deployment setup using **Docker**, **Laravel**, and **Vite**.
|
||||
Welcome to **MyKOPKB 1.0**, the streamlined training deployment setup using **Docker**, **Laravel**, and **Vite**.
|
||||
|
||||
---
|
||||
|
||||
@@ -13,10 +13,6 @@ Welcome to **SUTERA 3.0**, the streamlined training deployment setup using **Doc
|
||||
|
||||
---
|
||||
|
||||
## Formula Used:
|
||||
1. KEUPAYAAN (%) = (PEGANGAN/PERJAWATAN) * 100
|
||||
2. SIAPSIAGA or KESIAGAAN (%) = (BDG/perjawatan) * 100
|
||||
3. SERVISIBILITI (%) = (BDG/pegangan) * 100
|
||||
|
||||
## Laravel command to clear
|
||||
```bash
|
||||
@@ -38,58 +34,15 @@ sail artisan permission:cache-reset
|
||||
- Servisibility always higher than siapsiaga
|
||||
- Solution — put specific routes first before resource routes
|
||||
- to use soft delete, make id and deleted_at as unique
|
||||
|
||||
# Nwidart Command
|
||||
- to make new module, run:
|
||||
```bash
|
||||
sail artisan module:make Example
|
||||
```
|
||||
- There are two User model files
|
||||
|
||||
## PKJ Default Varian (DO NOT DELETE) or update. If require update, be sure to update the export name for each PKJ report:
|
||||
- BANTUAN MOBILITI
|
||||
- BEKALAN AIR
|
||||
- EOD/IED/PEMUSNAHAN
|
||||
- JURUUKUR
|
||||
- KENDERAAN JENIS A
|
||||
- KENDERAAN JENIS B
|
||||
- OPTRONIK DAN PERALATAN LATIHAN
|
||||
- PELURU DAN BAHAN LETUPAN
|
||||
- PEMUSNAHAN
|
||||
- PERALATAN KETUKANGAN
|
||||
- PERALATAN KOMUNIKASI PERTAHANAN
|
||||
- PERALATAN PD&P
|
||||
- PERALATAN PERAIRAN
|
||||
- PERALATAN PNBK
|
||||
- SENJATA PERTAHANAN
|
||||
|
||||
|
||||
```sql
|
||||
--- KJC TO UPDATE PEGANGAN IN PERJAWATAN TABLE; CHECK WILL BE UPDATED FIRST
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.entitlement,
|
||||
ae.holding AS current_holding,
|
||||
(
|
||||
SELECT COUNT(*)
|
||||
FROM kjc_asset_holdings ah
|
||||
WHERE ah.kjc_category_id = ae.kjc_category_id
|
||||
AND ah.kjc_category_id = ae.kjc_category_id
|
||||
AND ah.unit_id = ae.unit_id
|
||||
AND ah.deleted_at IS NULL
|
||||
) AS actual_holding_count
|
||||
FROM kjc_asset_entitlements ae
|
||||
WHERE ae.deleted_at IS NULL;
|
||||
|
||||
--- EXECUTE IT
|
||||
UPDATE kjc_asset_entitlements ae
|
||||
SET ae.holding = (
|
||||
SELECT COUNT(*)
|
||||
FROM kjc_asset_holdings ah
|
||||
WHERE ah.kjc_category_id = ae.kjc_category_id
|
||||
AND ah.kjc_category_id = ae.kjc_category_id
|
||||
AND ah.unit_id = ae.unit_id
|
||||
AND ah.deleted_at IS NULL
|
||||
)
|
||||
WHERE ae.deleted_at IS NULL;
|
||||
- create migration in module
|
||||
```bash
|
||||
sail artisan module:make-migration add_more_details_to_users_table User
|
||||
```
|
||||
|
||||
## Run specific laravel migration:
|
||||
@@ -117,23 +70,7 @@ SELECT last_value FROM public.permissions_id_seq;
|
||||
SELECT setval('public.permissions_id_seq', COALESCE((SELECT MAX(id) FROM permissions), 0) + 1, false);
|
||||
```
|
||||
|
||||
## Run capture data command
|
||||
```bash
|
||||
# kjc
|
||||
sail artisan kjc:historical:trigger
|
||||
|
||||
# pkj
|
||||
sail artisan pkj:historical:trigger
|
||||
```
|
||||
|
||||
## Auto-generate weekly KJC report (Jabatan Arah RAJD) - Scheduled to run every Monday at 3:00 AM.
|
||||
```bash
|
||||
# Manual trigger
|
||||
sail artisan kjc:auto-generate-weekly-report "Jabatan Arah RAJD"
|
||||
|
||||
# Force regenerate even if reports exist
|
||||
sail artisan kjc:auto-generate-weekly-report "Jabatan Arah RAJD" --force
|
||||
```
|
||||
---
|
||||
|
||||
# Git
|
||||
## DO NOT RUN THIS BECAUSE IT WILL REMOVE ALL THE UNTAGGED FILES IN LOCAL
|
||||
|
||||
Reference in New Issue
Block a user