generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ORV2-2464: Refactor and update UI and hooks for all vehicle related c…
…omponents (#1448)
- Loading branch information
Showing
37 changed files
with
1,297 additions
and
1,180 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
frontend/src/common/components/table/OnRouteBCTableRowActions.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@import "../../../themes/orbcStyles"; | ||
|
||
.onroutebc-table-row-actions { | ||
display: flex; | ||
justify-content: flex-end; | ||
|
||
& &__button { | ||
background-color: $white; | ||
border: none; | ||
padding: 0.75rem 1.25rem; | ||
border-radius: 0.25rem; | ||
|
||
&--disabled { | ||
color: $disabled-colour; | ||
} | ||
|
||
&:hover { | ||
background-color: $bc-background-light-grey; | ||
cursor: pointer; | ||
} | ||
|
||
&:focus { | ||
border: 2px solid $focus-blue; | ||
} | ||
|
||
&--pressed { | ||
border: 2px solid $bc-black; | ||
background-color: $bc-background-light-grey; | ||
} | ||
} | ||
|
||
&__popper.popper > .tooltip.tooltip--bottom { | ||
font-size: 1rem; | ||
color: $white; | ||
background-color: $bc-black; | ||
font-weight: normal; | ||
border-radius: 0.25rem; | ||
margin-top: 0.25rem; | ||
} | ||
|
||
&__icon { | ||
font-size: 1.5rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
padding: 0; | ||
min-width: 0; | ||
max-width: 3rem; | ||
overflow: visible; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 30 additions & 3 deletions
33
frontend/src/features/manageVehicles/apiManager/endpoints/endpoints.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
import { VEHICLES_URL } from "../../../../common/apiManager/endpoints/endpoints"; | ||
|
||
const POWER_UNIT_BASE_URI = (companyId: string | number) => | ||
`${VEHICLES_URL}/companies/${companyId}/vehicles/powerUnits`; | ||
|
||
const TRAILER_BASE_URI = (companyId: string | number) => | ||
`${VEHICLES_URL}/companies/${companyId}/vehicles/trailers`; | ||
|
||
export const VEHICLES_API = { | ||
POWER_UNIT: `${VEHICLES_URL}/vehicles/powerUnits`, | ||
POWER_UNIT_TYPES: `${VEHICLES_URL}/vehicles/power-unit-types`, | ||
|
||
TRAILER: `${VEHICLES_URL}/vehicles/trailers`, | ||
TRAILER_TYPES: `${VEHICLES_URL}/vehicles/trailer-types`, | ||
POWER_UNITS: { | ||
ALL: (companyId: string | number) => | ||
`${POWER_UNIT_BASE_URI(companyId)}`, | ||
DETAIL: (companyId: string | number, powerUnitId: string) => | ||
`${POWER_UNIT_BASE_URI(companyId)}/${powerUnitId}`, | ||
ADD: (companyId: string | number) => | ||
`${POWER_UNIT_BASE_URI(companyId)}`, | ||
UPDATE: (companyId: string | number, powerUnitId: string) => | ||
`${POWER_UNIT_BASE_URI(companyId)}/${powerUnitId}`, | ||
DELETE: (companyId: string | number) => | ||
`${POWER_UNIT_BASE_URI(companyId)}/delete-requests`, | ||
}, | ||
TRAILERS: { | ||
ALL: (companyId: string | number) => | ||
`${TRAILER_BASE_URI(companyId)}`, | ||
DETAIL: (companyId: string | number, trailerId: string) => | ||
`${TRAILER_BASE_URI(companyId)}/${trailerId}`, | ||
ADD: (companyId: string | number) => | ||
`${TRAILER_BASE_URI(companyId)}`, | ||
UPDATE: (companyId: string | number, trailerId: string) => | ||
`${TRAILER_BASE_URI(companyId)}/${trailerId}`, | ||
DELETE: (companyId: string | number) => | ||
`${TRAILER_BASE_URI(companyId)}/delete-requests`, | ||
}, | ||
}; |
Oops, something went wrong.