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