Skip to content

Commit

Permalink
OHRM5X-2456: Add on-demand changes to 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ManulMax committed Jan 22, 2024
1 parent 264834c commit b342414
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions installer/Util/AppSetupUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions installer/cli_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -149,4 +151,8 @@
$appSetupUtility->writeKeyFile();
}

$request = new Request();
$request->setMethod(Request::METHOD_POST);
(new InstallerDataRegistrationAPI())->handle($request);

echo "Done\n";
2 changes: 1 addition & 1 deletion src/client/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
};
Expand Down

0 comments on commit b342414

Please sign in to comment.