diff --git a/installer/Util/AppSetupUtility.php b/installer/Util/AppSetupUtility.php index 5928ee6037..5f3b9e33c0 100644 --- a/installer/Util/AppSetupUtility.php +++ b/installer/Util/AppSetupUtility.php @@ -438,8 +438,8 @@ public function writeConfFile(): void $dbInfo[StateContainer::DB_HOST], $dbInfo[StateContainer::DB_PORT], $dbInfo[StateContainer::DB_NAME], - $dbInfo[StateContainer::DB_USER], - $dbInfo[StateContainer::DB_PASSWORD] + $dbInfo[StateContainer::ORANGEHRM_DB_USER] ?? $dbInfo[StateContainer::DB_USER], + $dbInfo[StateContainer::ORANGEHRM_DB_PASSWORD] ?? $dbInfo[StateContainer::DB_PASSWORD], ]; $fs = new Filesystem(); diff --git a/installer/cli_install.php b/installer/cli_install.php index e8bf914dba..4cb28f38c2 100755 --- a/installer/cli_install.php +++ b/installer/cli_install.php @@ -26,6 +26,8 @@ use OrangeHRM\Installer\Util\AppSetupUtility; use OrangeHRM\Installer\Util\StateContainer; use Symfony\Component\Yaml\Yaml; +use OrangeHRM\Framework\Http\Request; +use OrangeHRM\Installer\Controller\Installer\Api\InstallerDataRegistrationAPI; $pathToAutoload = realpath(__DIR__ . '/../src/vendor/autoload.php'); @@ -149,4 +151,8 @@ $appSetupUtility->writeKeyFile(); } +$request = new Request(); +$request->setMethod(Request::METHOD_POST); +(new InstallerDataRegistrationAPI())->handle($request); + echo "Done\n"; diff --git a/src/client/src/main.ts b/src/client/src/main.ts index 5cd0d15909..a11ef0c397 100644 --- a/src/client/src/main.ts +++ b/src/client/src/main.ts @@ -48,7 +48,7 @@ const baseUrl = window.appGlobal.baseUrl; const {i18n, init} = createI18n({ baseUrl: baseUrl, - resourceUrl: 'core/i18n/messages', + resourceUrl: '/core/i18n/messages', }); app.use(acl); diff --git a/src/client/src/orangehrmClaimPlugin/components/AddAttachmentModal.vue b/src/client/src/orangehrmClaimPlugin/components/AddAttachmentModal.vue index 52e4afb34c..e6c873ba1b 100644 --- a/src/client/src/orangehrmClaimPlugin/components/AddAttachmentModal.vue +++ b/src/client/src/orangehrmClaimPlugin/components/AddAttachmentModal.vue @@ -116,7 +116,7 @@ export default { setup(props) { const http = new APIService( window.appGlobal.baseUrl, - `api/v2/claim/requests/${props.requestId}/attachments`, + `/api/v2/claim/requests/${props.requestId}/attachments`, ); return { http, diff --git a/src/client/src/orangehrmClaimPlugin/components/AddExpenseModal.vue b/src/client/src/orangehrmClaimPlugin/components/AddExpenseModal.vue index a453157d3c..b0482a587b 100644 --- a/src/client/src/orangehrmClaimPlugin/components/AddExpenseModal.vue +++ b/src/client/src/orangehrmClaimPlugin/components/AddExpenseModal.vue @@ -128,7 +128,7 @@ export default { setup(props) { const http = new APIService( window.appGlobal.baseUrl, - `api/v2/claim/requests/${props.requestId}/expenses`, + `/api/v2/claim/requests/${props.requestId}/expenses`, ); const {userDateFormat} = useDateFormat(); diff --git a/src/client/src/orangehrmClaimPlugin/components/ClaimEventDropdown.vue b/src/client/src/orangehrmClaimPlugin/components/ClaimEventDropdown.vue index 268b53bde5..d458fa8090 100644 --- a/src/client/src/orangehrmClaimPlugin/components/ClaimEventDropdown.vue +++ b/src/client/src/orangehrmClaimPlugin/components/ClaimEventDropdown.vue @@ -34,7 +34,7 @@ export default { const options = ref([]); const http = new APIService( window.appGlobal.baseUrl, - 'api/v2/claim/events', + '/api/v2/claim/events', ); onBeforeMount(() => { http.getAll({limit: 0, status: true}).then(({data}) => { diff --git a/src/client/src/orangehrmClaimPlugin/components/ClaimExpenseTypeDropdown.vue b/src/client/src/orangehrmClaimPlugin/components/ClaimExpenseTypeDropdown.vue index 784d97a1da..9fb8bc64e9 100644 --- a/src/client/src/orangehrmClaimPlugin/components/ClaimExpenseTypeDropdown.vue +++ b/src/client/src/orangehrmClaimPlugin/components/ClaimExpenseTypeDropdown.vue @@ -35,7 +35,7 @@ export default { const options = ref([]); const http = new APIService( window.appGlobal.baseUrl, - 'api/v2/claim/expenses/types', + '/api/v2/claim/expenses/types', ); onBeforeMount(() => { http.getAll({limit: 0, status: true}).then(({data}) => { diff --git a/src/client/src/orangehrmClaimPlugin/components/EditAttachmentModal.vue b/src/client/src/orangehrmClaimPlugin/components/EditAttachmentModal.vue index 76f401d809..0b42ef0a51 100644 --- a/src/client/src/orangehrmClaimPlugin/components/EditAttachmentModal.vue +++ b/src/client/src/orangehrmClaimPlugin/components/EditAttachmentModal.vue @@ -130,7 +130,7 @@ export default { setup(props) { const http = new APIService( window.appGlobal.baseUrl, - `api/v2/claim/requests/${props.requestId}/attachments`, + `/api/v2/claim/requests/${props.requestId}/attachments`, ); return { http, diff --git a/src/client/src/orangehrmClaimPlugin/components/EditExpenseModal.vue b/src/client/src/orangehrmClaimPlugin/components/EditExpenseModal.vue index 1b0f956a1b..bf0e557336 100644 --- a/src/client/src/orangehrmClaimPlugin/components/EditExpenseModal.vue +++ b/src/client/src/orangehrmClaimPlugin/components/EditExpenseModal.vue @@ -132,7 +132,7 @@ export default { setup(props) { const http = new APIService( window.appGlobal.baseUrl, - `api/v2/claim/requests/${props.requestId}/expenses`, + `/api/v2/claim/requests/${props.requestId}/expenses`, ); const {userDateFormat} = useDateFormat(); diff --git a/src/client/src/orangehrmDashboardPlugin/pages/ViewDashboard.vue b/src/client/src/orangehrmDashboardPlugin/pages/ViewDashboard.vue index 435d8ba480..f5743f6da3 100644 --- a/src/client/src/orangehrmDashboardPlugin/pages/ViewDashboard.vue +++ b/src/client/src/orangehrmDashboardPlugin/pages/ViewDashboard.vue @@ -76,7 +76,7 @@ export default { 'employee-attendance-widget': EmployeeAttendanceWidget, }, mounted() { - const http = new APIService(window.appGlobal.baseUrl, 'events/push'); + const http = new APIService(window.appGlobal.baseUrl, '/events/push'); http.create(); }, };