Skip to content

Commit

Permalink
show filled icon for identifiable locations
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas committed Sep 27, 2024
1 parent 1d945a4 commit bc43046
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions frontend/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ export type SpaceDescriptionType = EntityDescription & {
/** Relevant (Latin) terminology used to describe this entity in the source text */
designators: Array<Scalars['String']['output']>;
episodes: Array<EpisodeSpaceType>;
hasIdentifiableFeatures: Scalars['Boolean']['output'];
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
/** The page number or page range in the source */
Expand Down Expand Up @@ -1216,7 +1217,7 @@ export type DataEntrySpaceDescriptionQueryVariables = Exact<{
}>;


export type DataEntrySpaceDescriptionQuery = { __typename?: 'Query', spaceDescription?: { __typename?: 'SpaceDescriptionType', id: string, name: string, description: string, source: { __typename?: 'SourceType', id: string, name: string } } | null };
export type DataEntrySpaceDescriptionQuery = { __typename?: 'Query', spaceDescription?: { __typename?: 'SpaceDescriptionType', id: string, name: string, description: string, hasIdentifiableFeatures: boolean, source: { __typename?: 'SourceType', id: string, name: string } } | null };

export type DataEntryEpisodeEntityLinkQueryVariables = Exact<{
entity: Scalars['ID']['input'];
Expand Down Expand Up @@ -1246,7 +1247,7 @@ export type DataEntrySourceDetailQueryVariables = Exact<{
}>;


export type DataEntrySourceDetailQuery = { __typename?: 'Query', source: { __typename?: 'SourceType', id: string, name: string, episodes: Array<{ __typename?: 'EpisodeType', id: string, name: string, description: string, summary: string, book: string, chapter: string, page: string, contributors: Array<{ __typename?: 'UserType', id: string, fullName: string }>, agents: Array<{ __typename?: 'AgentDescriptionType', id: string, name: string, isGroup: boolean, describes: Array<{ __typename?: 'HistoricalPersonType', id: string, identifiable: boolean }> }>, gifts: Array<{ __typename?: 'GiftDescriptionType', id: string, name: string }>, letters: Array<{ __typename?: 'LetterDescriptionType', id: string, name: string }>, spaces: Array<{ __typename?: 'SpaceDescriptionType', id: string, name: string }> }> } };
export type DataEntrySourceDetailQuery = { __typename?: 'Query', source: { __typename?: 'SourceType', id: string, name: string, episodes: Array<{ __typename?: 'EpisodeType', id: string, name: string, description: string, summary: string, book: string, chapter: string, page: string, contributors: Array<{ __typename?: 'UserType', id: string, fullName: string }>, agents: Array<{ __typename?: 'AgentDescriptionType', id: string, name: string, isGroup: boolean, describes: Array<{ __typename?: 'HistoricalPersonType', id: string, identifiable: boolean }> }>, gifts: Array<{ __typename?: 'GiftDescriptionType', id: string, name: string }>, letters: Array<{ __typename?: 'LetterDescriptionType', id: string, name: string }>, spaces: Array<{ __typename?: 'SpaceDescriptionType', id: string, name: string, hasIdentifiableFeatures: boolean }> }> } };

export type DataEntrySourceListQueryVariables = Exact<{ [key: string]: never; }>;

Expand Down Expand Up @@ -1988,6 +1989,7 @@ export const DataEntrySpaceDescriptionDocument = gql`
id
name
description
hasIdentifiableFeatures
source {
id
name
Expand Down Expand Up @@ -2115,6 +2117,7 @@ export const DataEntrySourceDetailDocument = gql`
spaces {
id
name
hasIdentifiableFeatures
}
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ type SpaceDescriptionType implements EntityDescription {
"""
designators: [String!]!
episodes: [EpisodeSpaceType!]!
hasIdentifiableFeatures: Boolean!
id: ID!
name: String!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<ng-container *ngIf="data.spaceDescription as spaceDescription">
<h1 class="mb-4">
<lc-icon [icon]="dataIcons.location" />
<lc-icon [icon]="spaceDescription.hasIdentifiableFeatures ? dataIcons.locationIdentified : dataIcons.location" />
{{spaceDescription.name}}
<span class="text-secondary">
({{spaceDescription.source.name}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ query DataEntrySpaceDescription($id: ID!) {
id
name
description
hasIdentifiableFeatures
source {
id
name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
[routerLink]="['/data-entry', 'locations', space.id]"
class="icon-link"
>
<lc-icon [icon]="dataIcons.location" />
<lc-icon [icon]="space.hasIdentifiableFeatures ?
dataIcons.locationIdentified : dataIcons.location" />
{{ space.name }}
</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/data-entry/source/source.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ query DataEntrySourceDetail($id: ID!) {
spaces {
id
name
hasIdentifiableFeatures
}
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/shared/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const dataIcons = {
personUnknown: 'person',
group: 'people',
location: 'geo-alt',
locationIdentified: 'geo-alt-fill',
gift: 'gift',
letter: 'envelope',
};
Expand Down

0 comments on commit bc43046

Please sign in to comment.