Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

fix: fix breadcrumbs #1287

Merged
merged 1 commit into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@
<layout :notifications="notifications">
<div class="ph2 ph5-ns">
<breadcrumb
:root-url="'/' + $page.props.auth.company.id + '/dashboard/hr/job-openings/' + jobOpening.id"
:root="$t('app.breadcrumb_dashboard_job_opening_detail')"
:root-url="'/' + $page.props.auth.company.id + '/dashboard'"
:root="$t('app.breadcrumb_dashboard')"
:previous-url="'/' + $page.props.auth.company.id + '/dashboard/hr/job-openings/' + jobOpening.id"
:previous="$t('app.breadcrumb_dashboard_job_opening_detail')"
>
{{ $t('app.breadcrumb_dashboard_job_opening_candidate') }}
</breadcrumb>
Expand Down
7 changes: 5 additions & 2 deletions resources/js/Pages/Dashboard/HR/JobOpenings/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
<layout :notifications="notifications">
<div class="ph2 ph5-ns">
<breadcrumb
:root-url="'/' + $page.props.auth.company.id + '/dashboard/hr'"
:root="$t('app.breadcrumb_hr')"
:root-url="'/' + $page.props.auth.company.id + '/dashboard'"
:root="$t('app.breadcrumb_dashboard')"
:previous-url="'/' + $page.props.auth.company.id + '/dashboard/hr'"
:previous="$t('app.breadcrumb_hr')"
:has-more="false"
:custom-class="'mb4'"
>
{{ $t('app.breadcrumb_hr_job_openings_active') }}
</breadcrumb>
Expand Down
6 changes: 4 additions & 2 deletions resources/js/Pages/Dashboard/HR/JobOpenings/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@
<layout :notifications="notifications">
<div class="ph2 ph5-ns">
<breadcrumb
:root-url="'/' + $page.props.auth.company.id + '/dashboard/hr/job-openings'"
:root="$t('app.breadcrumb_hr_job_openings_active')"
:root-url="'/' + $page.props.auth.company.id + '/dashboard'"
:root="$t('app.breadcrumb_dashboard')"
:previous-url="'/' + $page.props.auth.company.id + '/dashboard/hr/job-openings'"
:previous="$t('app.breadcrumb_hr_job_openings_active')"
>
{{ $t('app.breadcrumb_job_opening_detail') }}
</breadcrumb>
Expand Down
24 changes: 23 additions & 1 deletion resources/js/Shared/Layout/Breadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="['mt4-l mt1 mw6 br3 center breadcrumb relative z-0 f6 pb2', {'bg-white box': withBox}]">
<div :class="localClasses">
<ul class="list ph0 tc-l tl">
<li class="di">
<inertia-link :href="cRootUrl">{{ cRoot }}</inertia-link>
Expand Down Expand Up @@ -44,6 +44,16 @@ export default {
type: String,
default: null,
},
customClass: {
type: String,
default: null,
}
},

data() {
return {
localClasses: '',
};
},

computed: {
Expand All @@ -54,6 +64,18 @@ export default {
cRoot: function () {
return this.root ?? this.$t('app.breadcrumb_company');
}
},

mounted() {
this.localClasses = 'mt4-l mt1 mw6 br3 center breadcrumb relative z-0 f6 pb2';

if (this.withBox) {
this.localClasses = this.localClasses + ' bg-white box';
}

if (this.customClass) {
this.localClasses = this.localClasses + ' ' + this.customClass;
}
}
};
</script>