88 Commits

Author SHA1 Message Date
Jp
993d096283 test 2026-02-26 14:02:41 +08:00
Jp
08817af0ca test 2026-02-26 14:00:19 +08:00
Jp
afb7cefdda test 2026-02-26 13:56:10 +08:00
Jp
08fe589ad6 test 2026-02-26 13:54:47 +08:00
Jp
1937e26251 test 2026-02-26 13:46:33 +08:00
Jp
1dbc32722a chore: improve container build and deployment configuration
- Add common system directories to .dockerignore to prevent accidental inclusion
- Reorder Dockerfile instructions for better clarity and performance
- Remove remote deployment targets from Makefile to simplify local development workflow
2026-02-26 13:44:36 +08:00
Jp
a4124ceaa9 test 2026-02-26 13:42:31 +08:00
Jp
8b23298196 test 2026-02-26 13:39:45 +08:00
Jp
3c251e9c3a test 2026-02-26 13:36:40 +08:00
Jp
f635dabbc5 test 2026-02-26 13:34:20 +08:00
Jp
e0f459f9ea refactor(Dockerfile): simplify image build and permission handling
- Use fully qualified image names for clarity
- Remove manual PHP extension installation as base image likely includes them
- Leverage COPY --chown to set permissions directly
- Remove redundant permission fix commands
- Keep same final command and exposed port
2026-02-26 13:33:07 +08:00
Jp
8c414e7e70 build: switch to thecodingmachine PHP image for enhanced features
The base image is changed from the official php:8.4-fpm-alpine to thecodingmachine/php:8.4-v4-fpm-alpine to leverage additional pre-installed extensions, configurations, and utilities provided by the TheCodingMachine Docker images, which simplifies the setup for common PHP development and production environments.
2026-02-26 13:31:46 +08:00
Jp
49226f8aa1 build: simplify Dockerfile using extension installer
- Replace manual apk install and docker-php-ext-install with mlocati/docker-php-extension-installer
- Combine system dependency installation and PHP extension setup into a single step
- Reorder steps for better clarity: copy files before permission fixes
- Maintain same PHP extensions and final permissions
2026-02-26 13:27:58 +08:00
Jp
77ed347e36 build: switch to Alpine base image and simplify Dockerfile
- Use php:8.4-fpm-alpine for smaller image size
- Replace apt-get with apk package manager
- Use docker-php-ext-install instead of external extension installer
- Remove unnecessary comments and clean up cache appropriately
2026-02-26 13:17:33 +08:00
Jp
4ade74421c chore(docker): switch to mlocati's PHP extension installer
The docker-php-ext-install command can have permission issues on some
remote servers when extracting tarballs. Using mlocati/docker-php-extension-installer
provides a more reliable method for installing PHP extensions in Docker
containers.
2026-02-26 12:54:55 +08:00
Jp
8e3913bda8 fix(Dockerfile): replace php extension installer with docker-php-ext-install
The third-party extension installer (mlocati/docker-php-extension-installer) was causing tar permission issues on the remote server. Using the standard `docker-php-ext-install` method resolves this compatibility problem.
2026-02-26 11:44:16 +08:00
Jp
fea727daf4 ci(Docker): add --cleanup flag to install-php-extensions
Add the --cleanup flag to the install-php-extensions command to remove downloaded archives after installation, reducing the final image size.

Use the --no-cache flag for the remote podman build in the deployment script to ensure a clean build from the latest source on the server.
2026-02-26 11:36:50 +08:00
Jp
cea2749252 ci: build image remotely before deploying to server
Previously the image was built locally and pushed to a registry. Now we build directly on the remote server to simplify the deployment flow and avoid registry dependencies.
2026-02-26 11:34:48 +08:00
Jp
5992b28eb5 ci: use rm -f to avoid errors when cleaning up temporary files
The -f flag prevents errors if the files do not exist, ensuring the cleanup step is robust and does not fail the deployment process.
2026-02-26 11:30:32 +08:00
Jp
e6acea80a0 chore(deploy): prepend sudo to kubectl commands in Makefile
Ensure kubectl commands have necessary permissions when generating ConfigMaps during deployment.
2026-02-26 11:29:03 +08:00
Jp
02dbea230c fix(deploy): add sudo to kubectl apply command for proper permissions
The deploy-server target was failing due to insufficient permissions on the remote server. Adding sudo ensures kubectl can apply the deployment configuration.
2026-02-26 11:27:10 +08:00
Jp
07748a7025 chore(Makefile): update server config and improve deployment scripts
- Update default server user, IP, and deployment path to match current environment
- Redirect podman kube down output to /dev/null to reduce noise
- Use /tmp directory for temporary YAML files to avoid WSL permission issues
- Consolidate deployment steps to reduce password prompts during remote deployment
2026-02-26 11:25:54 +08:00
Jp
55d2f61d09 ci: streamline server deployment by reducing SSH prompts
Generate a temporary merged YAML file locally before copying to the server. This reduces the number of SSH/SCP commands from multiple to two, minimizing password prompts and connection overhead.
2026-02-26 11:23:30 +08:00
Jp
aef00b405a chore: remove redundant .env copy commands from deploy targets
The .env file is now expected to be present before running deploy commands. This simplifies the Makefile by removing conditional copy logic that was causing confusion about environment setup.
2026-02-26 11:19:19 +08:00
Jp
ac41090ed3 feat(Makefile): add remote server deployment target
Add deploy-server target to deploy application to a remote Kubernetes cluster.
Includes server configuration variables and uses scp/ssh for file transfer and
kubectl commands for applying configuration and deployment.
2026-02-26 11:14:39 +08:00
Jp
ba9c80b9b4 fix(Dockerfile): set proper permissions and remove CI directories
The previous COPY instruction with --chown flag was not recursively setting permissions. Explicitly set directory and file permissions for the www-data user and remove unnecessary CI directories to reduce image size and potential security exposure.
2026-02-26 11:08:20 +08:00
Jp
618f826e1e ci: improve deployment script verbosity and error handling
- Remove stderr suppression from podman kube down to show potential errors
- Remove @ prefix from kubectl command to show execution in output
- Add comment clarifying the purpose of removing stderr redirection
2026-02-26 11:06:21 +08:00
Jp
baf68078a7 ci: switch from Kubernetes to Podman for local deployment
- Update Dockerfile to use fully qualified composer image name
- Replace kubectl commands with podman kube play/down in Makefile
- Change from Kubernetes Secret to ConfigMap for environment variables
- Set imagePullPolicy to Never and use localhost/ prefix for local images
- Reduce replica count to 1 for local development
- Add stop target to Makefile for easier cleanup
2026-02-26 10:55:30 +08:00
Jp
87fd507618 chore(docker): move WORKDIR declaration earlier and reorder steps
Set working directory before copying files to avoid potential conflicts with host files. Also reorder Dockerfile steps for better logical flow and maintainability.
2026-02-25 22:52:20 +08:00
Jp
a697100103 chore(docker): ignore CI directories and use extension installer
- Add .github and .circleci to .dockerignore to reduce image size
- Replace docker-php-ext-install with mlocati's extension installer for better reliability and maintenance
2026-02-25 22:43:35 +08:00
Jp
dd188724be build(docker): enhance Docker setup with proper dependencies and structure
- Add comprehensive .dockerignore file to exclude unnecessary files
- Update Dockerfile to install required system dependencies and PHP extensions
- Set proper working directory and user permissions
- Use multi-stage build for Composer installation
2026-02-25 22:34:05 +08:00
95301dc1d8 Merge pull request #10 from kingjaypee12/jp/deployment
chore: migrate from docker compose to kubernetes deployment
2026-02-25 22:06:17 +08:00
Jp
673a6ce166 chore: migrate from docker compose to kubernetes deployment
- Replace Docker Compose setup with Kubernetes manifests for deployment
- Simplify Dockerfile to use PHP's built-in server instead of nginx+supervisor
- Add Makefile with build and deploy commands for local development
- Update environment configuration for production deployment
- Remove docker-specific configuration files (nginx.conf, supervisord.conf)
2026-02-25 22:05:41 +08:00
Jp
e57e6d3413 feat(docker): add standalone Docker setup and remove docker-compose
- Replace Laravel Sail docker-compose with a single-container Dockerfile
- Configure nginx and PHP-FPM via supervisor for production-like environment
- Include optimized PHP extensions and Redis support
- Simplify deployment by removing multi-service orchestration
2026-02-19 16:33:03 +08:00
Jp
feba3f1464 style: remove unnecessary !important from CSS utility classes
The !important flag was previously used to override Tailwind's default styles, but it is no longer needed after recent framework updates. This change improves maintainability and follows CSS best practices by avoiding excessive specificity.
2026-02-19 03:18:00 +08:00
Jp
6eeedbeeb0 feat(transmittal): replace PDF export with Excel export and add logo
- Remove PDF export functionality from TransmittalResource and CreateTransmittal page
- Add new TransmittalExcelExport class for formatted Excel exports with company logo
- Update export jobs to generate unique filenames per user and refresh user data
- Replace PDF export action with Excel export in table actions
- Comment out logo in PDF view template as it's no longer used
- Fix import alias for Excel export action in GeneralLedger
2026-02-19 03:11:17 +08:00
Jp
b95f23f223 upgrade to filament v4 2026-02-19 01:26:02 +08:00
Jp
90c92650b7 upgrade to filament v4 2026-02-19 01:25:41 +08:00
Jp
2bf12aa4e8 fix: correct notification class usage in PDF export job
The notification was using the wrong class (Notifications instead of Notification). This caused the export completion notification to fail. Updated the import and instantiation to use the correct Filament Notification class.
2026-02-18 23:13:46 +08:00
Jp
df66727379 refactor: use correct Filament Action import in export jobs
Update import statements to use Filament\Notifications\Actions\Action instead of the incorrect Actions\Action and NotificationAction aliases. This ensures consistency with the Filament notification system.
2026-02-18 23:07:29 +08:00
1d6238e9cb Merge pull request #9 from kingjaypee12/jp/updates-on-sales
Jp/updates on sales
2026-02-18 22:58:34 +08:00
Jp
d8077f200a feat: replace Excel export with PDF export for transmittals
- Add new TransmittalPDFExportJob to generate PDFs using dompdf
- Remove old Excel export implementation (TransmittalsExport)
- Update ExportCompleteJob to use new PDF job instead of Excel
- Add TestQueueJob for queue testing with new route
- Update notification label from "Download File" to "Download PDF File"
- Fix auth() helper usage by importing Auth facade consistently
2026-02-18 22:57:34 +08:00
Jp
7899ed75ea feat(sales): add discount support with ledger accounting
- Add discount_type column to transactions table via migration
- Update Sale model to use fillable instead of guarded for better security
- Implement discount account ledger creation when discount is applied
- Fix net amount calculation to include discount in CreateSaleAction
- Remove unused "Exempt" column from sale transaction table
- Make discount_type required when discount is enabled in form
- Update form data mutation to properly handle discount calculations
2026-02-18 21:40:39 +08:00
Jp
5d427cdea4 feat: add discount management and PDF export for transmittals
- Create Discount model, migration, and Filament resource with relation to Client
- Add PDF export functionality for transmittals using DomPDF
- Include discount type selection in sales transactions
- Fix account filtering logic in expense resource
- Update export job to generate PDF instead of Excel
2026-02-18 01:42:44 +08:00
2644be0505 Merge pull request #8 from kingjaypee12/jp/sales-clean-up
feat(SaleResource): redirect to client after sale creation
2026-02-16 02:08:01 +08:00
Jp
9ddb71f03d feat(SaleResource): redirect to client after sale creation
When a client is associated with the sale, redirect to the client's view page with the sales relation manager active instead of the default list page. This improves the user workflow by keeping the context focused on the client.
2026-02-16 02:06:59 +08:00
eadcc0b3d7 Merge pull request #7 from kingjaypee12/jp/sales-clean-up
Jp/sales clean up
2026-02-16 02:03:02 +08:00
Jp
8c6fa6cb08 refactor(client): extract base account generation to command
Move the logic for generating base accounts for a new client from the ClientObserver into a dedicated command class (GenerateBaseAccountCommand). This improves code organization and reusability.

- The command is now used in the ClientObserver::created method.
- The command is also made available as a manual action in the AccountsRelationManager table header, allowing admins to generate base accounts for existing clients that lack them.
- Added necessary imports to the CreateSale page, though the command is not directly used there in this diff, suggesting preparatory work for future integration.
2026-02-16 02:02:26 +08:00
Jp
7bcfaff311 refactor: extract transaction creation and account syncing to actions
- Introduce CreateRecordTransactionsAction to handle transaction creation for any model
- Introduce SyncAccountsAction to encapsulate account synchronization logic
- Refactor CreateSaleAction to use new actions and handle full sale creation flow
- Simplify CreateExpense and CreateSale pages by delegating to actions
- Ensure proper transaction handling with database rollback on failure
2026-02-16 01:48:25 +08:00
Jp
e04689acca refactor(sales): replace service with command and action pattern
- Replace SaleService with CreateSaleCommand and CreateSaleAction for better separation of concerns
- Move sale creation logic into dedicated command class following command pattern
- Update CreateSale.php to use new action instead of direct service call
- Wrap sale creation in database transaction for data consistency
2026-02-16 01:22:00 +08:00