-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3 - per location compensations (#540)
* feat(compensations): offices reference * feat(compensations): offices array preview * docs(compensations): improve array preview comment * feat(compensations): move offices string to preview subtitle and reformat * feat(compensations): helper description for offices field * feat(office): default descriptions for reusable office and offices fields * feat(compensations): rename office -> locations * docs(compensations): remove explainer for preview truncation cutoff * docs(compensations): document preview string function * docs(compensations): reword locations preview comment
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { defineField } from "sanity"; | ||
import { locationId } from "../documents/location"; | ||
|
||
const locations = defineField({ | ||
name: "locations", | ||
type: "array", | ||
title: "Relevant Locations", | ||
description: | ||
"You can tailor this content to specific office locations by selecting them here. If the content applies to all locations, just leave this field empty.", | ||
of: [ | ||
{ | ||
title: "Select a location", | ||
type: "reference", | ||
to: [{ type: locationId }], | ||
options: { | ||
disableNew: true, | ||
}, | ||
}, | ||
], | ||
}); | ||
|
||
export default locations; |