Skip to content

Commit

Permalink
docs(compensations): document preview string function
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Sep 3, 2024
1 parent 34f0df4 commit 6e31247
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions studio/schemas/documents/compensations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ const compensations = defineType({
},
});

/**
* Generates a preview string based on the selected office locations.
*
* @param {Object} locationsMap - A map of office titles selected for preview, e.g., { office0: "Trondheim", office1: "Oslo", ... }.
* @param {number} cutoff - The maximum number of locations to display before shortening the preview string.
* @returns {string|undefined} - A formatted string summarizing the selected locations or `undefined` if no locations are selected.
*/
function previewStringFromLocationsMap(
locationsMap: {
[key: string]: string;
Expand Down

0 comments on commit 6e31247

Please sign in to comment.