2018-11-16 02:28:23 +01:00
|
|
|
// Function that returns the next Company Position in the "ladder"
|
|
|
|
// i.e. the next position to get promoted to
|
2023-07-11 15:23:17 +02:00
|
|
|
import type { CompanyPosition } from "./CompanyPosition";
|
2018-11-16 02:28:23 +01:00
|
|
|
import { CompanyPositions } from "./CompanyPositions";
|
|
|
|
|
2021-09-09 05:47:34 +02:00
|
|
|
export function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {
|
2023-07-11 15:23:17 +02:00
|
|
|
if (!currPos) return null;
|
2018-11-16 02:28:23 +01:00
|
|
|
|
2023-07-11 15:23:17 +02:00
|
|
|
const nextPosName = currPos.nextPosition;
|
|
|
|
if (!nextPosName) return null;
|
2018-11-16 02:28:23 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
return CompanyPositions[nextPosName];
|
2018-11-16 02:28:23 +01:00
|
|
|
}
|