From 4ffd845247d91fc78a767bf4c38c7bdc0e11dd6f Mon Sep 17 00:00:00 2001 From: Kris Jane Cabilan Date: Mon, 25 Nov 2024 11:04:49 +0800 Subject: [PATCH] Refractor --- .htaccess | 10 +++++----- README.md | 20 +++++++++---------- app/config/database.example.php | 2 +- app/index.php | 6 +++--- mmaos-sbs-buhi.sql | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- .../backend/config/test-database.example.php | 2 +- vite.config.js | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.htaccess b/.htaccess index beeaa7c1..b83276f9 100644 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,5 @@ RewriteEngine On -RewriteBase /mmaos-sbs-buhi/ +RewriteBase /sbs-aaaos-buhi/ # Exclude assets from rewrite rule RewriteCond %{REQUEST_URI} !\.(css|js|svg|jpg|jpeg|png|gif|woff2|ico|ttf)$ [NC] @@ -7,9 +7,9 @@ RewriteCond %{REQUEST_URI} !\.(css|js|svg|jpg|jpeg|png|gif|woff2|ico|ttf)$ [NC] # Redirect all requests to index.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)$ /mmaos-sbs-buhi/public/index.html [L] +RewriteRule ^(.*)$ /sbs-aaaos-buhi/public/index.html [L] # Exclude the public and app directories from the rewrite rule -RewriteCond %{REQUEST_URI} !^/mmaos-sbs-buhi/public/ -RewriteCond %{REQUEST_URI} !^/mmaos-sbs-buhi/app/ -RewriteRule ^(.*)$ /mmaos-sbs-buhi/public/$1 [L] +RewriteCond %{REQUEST_URI} !^/sbs-aaaos-buhi/public/ +RewriteCond %{REQUEST_URI} !^/sbs-aaaos-buhi/app/ +RewriteRule ^(.*)$ /sbs-aaaos-buhi/public/$1 [L] diff --git a/README.md b/README.md index 4b28409f..d6ca828c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# mmaos-sbs-buhi +# sbs-aaaos-buhi Tabulation System for Ambassador and Ambassadress of Sports (Buhi) @@ -14,15 +14,15 @@ Here are the steps to set up the development environment for this project: 2. Start Apache and MySQL through XAMPP if not already running. 3. Clone or download this repository to your XAMPP **htdocs** folder. - The final path should be `path_to/xampp/htdocs/mmaos-sbs-buhi`. + The final path should be `path_to/xampp/htdocs/sbs-aaaos-buhi`. 4. Copy [**`app/config/database.example.php`**](app/config/database.example.php) to **`app/config/database.php`**, then modify the database connection settings in the new file. 5. Inside [phpMyAdmin](http://localhost/phpmyadmin), - create a MySQL database named `mmaos-sbs-buhi` and import [mmaos-sbs-buhi.sql](mmaos-sbs-buhi.sql) into it. + create a MySQL database named `sbs-aaaos-buhi` and import [sbs-aaaos-buhi.sql](sbs-aaaos-buhi.sql) into it. -6. Open the terminal and navigate to the project directory **mmaos-sbs-buhi**. +6. Open the terminal and navigate to the project directory **sbs-aaaos-buhi**. 7. Execute the following commands to install the required dependencies: ```sh @@ -34,7 +34,7 @@ Here are the steps to set up the development environment for this project: npm run dev ``` -9. Open your web browser and access to view the application. +9. Open your web browser and access to view the application. --- @@ -49,7 +49,7 @@ Before getting started, ensure that you have [**Composer**](https://getcomposer. to **`tests/backend/config/test-database.php`**, then modify the database connection settings in the new file. 2. Inside [phpMyAdmin](http://localhost/phpmyadmin), - create a MySQL database named `test-mmaos-sbs-buhi` and import [mmaos-sbs-buhi.sql](mmaos-sbs-buhi.sql) into it. + create a MySQL database named `test-sbs-aaaos-buhi` and import [sbs-aaaos-buhi.sql](sbs-aaaos-buhi.sql) into it. 3. Run the following command to install the required dependencies. ```shell @@ -92,15 +92,15 @@ Here's how to compile the project for production deployment: npm run build ``` -2. Access the application by visiting `http://[host_name]/mmaos-sbs-buhi`, +2. Access the application by visiting `http://[host_name]/sbs-aaaos-buhi`, where `host_name` is the **IP address** or **host name** of the server in the network. For example: - - - - + - + - #### Admin Dashboard -Access the **admin dashboard** at . +Access the **admin dashboard** at . The default ***username*** and ***password*** is `admin`. #### Printing Results diff --git a/app/config/database.example.php b/app/config/database.example.php index 29d36bf0..5ede2cef 100644 --- a/app/config/database.example.php +++ b/app/config/database.example.php @@ -17,7 +17,7 @@ 'host' => 'localhost', 'user' => 'root', 'pass' => '', - 'dbname' => 'mmaos-sbs-buhi' + 'dbname' => 'sbs-aaaos-buhi' ]; $conn = new mysqli($config['host'], $config['user'], $config['pass'], $config['dbname']); diff --git a/app/index.php b/app/index.php index 33fe9173..bf15c9f9 100644 --- a/app/index.php +++ b/app/index.php @@ -59,7 +59,7 @@ $routes = [ - [ "name" => "Tabulation" , "route" => "/mmaos-sbs-buhi" ], + [ "name" => "Tabulation" , "route" => "/sbs-aaaos-buhi" ], [ "name" => "CRUD" , "route" => "crud/competitions.php" ], [ "name" => "User Assignments", "route" => "crud/assignment" ], [ "name" => "Eliminations" , "route" => "crud/eliminations" ], @@ -96,7 +96,7 @@ } - mmaos-sbs-buhi + sbs-aaaos-buhi @@ -112,7 +112,7 @@ -

mmaos-sbs-buhi

+

sbs-aaaos-buhi

Ambassador and Ambassadress of Sports (Buhi)

diff --git a/mmaos-sbs-buhi.sql b/mmaos-sbs-buhi.sql index 9ce2deb0..2b3c741d 100644 --- a/mmaos-sbs-buhi.sql +++ b/mmaos-sbs-buhi.sql @@ -18,7 +18,7 @@ SET time_zone = "+00:00"; /*!40101 SET NAMES utf8mb4 */; -- --- Database: `mmaos-sbs-buhi` +-- Database: `sbs-aaaos-buhi` -- -- -------------------------------------------------------- @@ -105,7 +105,7 @@ CREATE TABLE `competitions` ( -- INSERT INTO `competitions` (`id`, `slug`, `title`, `created_at`, `updated_at`) VALUES -(1, 'mmaos-sbs-buhi-2024', 'Ambassador and Ambassadress of Sports 2024', '2023-04-06 13:24:04', '2024-11-24 17:46:45'); +(1, 'sbs-aaaos-buhi-2024', 'Ambassador and Ambassadress of Sports 2024', '2023-04-06 13:24:04', '2024-11-24 17:46:45'); -- -------------------------------------------------------- diff --git a/package-lock.json b/package-lock.json index 1657d2f8..9a5b801b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "mmaos-sbs-buhi", + "name": "sbs-aaaos-buhi", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "mmaos-sbs-buhi", + "name": "sbs-aaaos-buhi", "version": "0.0.0", "dependencies": { "@mdi/font": "5.9.55", diff --git a/package.json b/package.json index f98b1fa4..a262087a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mmaos-sbs-buhi", + "name": "sbs-aaaos-buhi", "version": "0.0.0", "private": true, "scripts": { diff --git a/tests/backend/config/test-database.example.php b/tests/backend/config/test-database.example.php index 9fc496d7..b3c7f1c3 100644 --- a/tests/backend/config/test-database.example.php +++ b/tests/backend/config/test-database.example.php @@ -17,7 +17,7 @@ 'host' => 'localhost', 'user' => 'root', 'pass' => '', - 'dbname' => 'test-mmaos-sbs-buhi' + 'dbname' => 'test-sbs-aaaos-buhi' ]; $conn = new mysqli($config['host'], $config['user'], $config['pass'], $config['dbname']); diff --git a/vite.config.js b/vite.config.js index 6b8e7e95..e0e44e58 100644 --- a/vite.config.js +++ b/vite.config.js @@ -34,7 +34,7 @@ export default ({mode}) => { process.env = {...process.env, ...loadEnv(mode, process.cwd())}; const SKIP_BASE_PATH = process.env.VITE_SKIP_BASE_PATH; if (SKIP_BASE_PATH === undefined || SKIP_BASE_PATH === 'false') - config.base = '/mmaos-sbs-buhi/'; + config.base = '/sbs-aaaos-buhi/'; return defineConfig(config); }; \ No newline at end of file