Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Generator/DTO/Attributes/ChoiceAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ public ChoiceAttribute(PicklistAttributeMetadata metadata) : base(metadata)
DefaultValue = metadata.DefaultFormValue;
}

public ChoiceAttribute(StateAttributeMetadata metadata) : base(metadata)
{
Options = metadata.OptionSet.Options.Select(x => new Option(
x.Label.UserLocalizedLabel?.Label ?? string.Empty,
x.Value,
x.Color,
x.Description.UserLocalizedLabel?.Label.PrettyDescription() ?? string.Empty));
Type = "Single";
DefaultValue = metadata.DefaultFormValue;
}

public ChoiceAttribute(MultiSelectPicklistAttributeMetadata metadata) : base(metadata)
{
Options = metadata.OptionSet.Options.Select(x => new Option(
Expand Down
1 change: 1 addition & 0 deletions Generator/DataverseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ private static Attribute GetAttribute(AttributeMetadata metadata, EntityMetadata
PicklistAttributeMetadata picklist => new ChoiceAttribute(picklist),
MultiSelectPicklistAttributeMetadata multiSelect => new ChoiceAttribute(multiSelect),
LookupAttributeMetadata lookup => new LookupAttribute(lookup, logicalToSchema, logger),
StateAttributeMetadata state => new ChoiceAttribute(state),
StatusAttributeMetadata status => new StatusAttribute(status, (StateAttributeMetadata)entity.Attributes.First(x => x is StateAttributeMetadata)),
StringAttributeMetadata stringMetadata => new StringAttribute(stringMetadata),
IntegerAttributeMetadata integer => new IntegerAttribute(integer),
Expand Down
3 changes: 2 additions & 1 deletion Website/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default function LoginPage() {
{/* Footer Information */}
<div className="mt-6 text-center space-y-1 text-gray-700 text-xs">
<div className="">
Last Synched: <b>{LastSynched ? LastSynched.toLocaleString(undefined, {
Last synchronization: <b>{LastSynched ? LastSynched.toLocaleString('en-DK', {
timeZone: 'Europe/Copenhagen',
timeZoneName: 'short',
year: 'numeric',
month: 'short',
Expand Down
10 changes: 9 additions & 1 deletion Website/components/aboutview/AboutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ export const AboutView = ({}: IAboutViewProps) => {

{/* Data Sync */}
<div className="text-center text-sm text-gray-500 mt-8">
Last Synched - {LastSynched ? LastSynched.toLocaleString(undefined, { timeZoneName: 'short' }) : '...'}
Last synchronization: <b>{LastSynched ? LastSynched.toLocaleString('en-DK', {
timeZone: 'Europe/Copenhagen',
timeZoneName: 'short',
year: 'numeric',
month: 'short',
day: 'numeric',
hour: '2-digit',
minute: '2-digit'
}) : '...'}</b>
</div>
</div>
</TooltipProvider>
Expand Down
11 changes: 7 additions & 4 deletions Website/components/datamodelview/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ export const Section = React.memo(
</TabsTrigger>
: <></>
}
<TabsTrigger value="keys" className="flex items-center min-w-[100px] sm:min-w-[120px] px-2 sm:px-4 py-2 text-xs sm:text-sm truncate data-[state=active]:bg-gray-50 data-[state=active]:shadow-sm transition-all duration-200">
<KeyRound className="mr-2 h-4 w-4 shrink-0" />
<span className="truncate">Keys [{visibleKeyCount}]</span>
</TabsTrigger>
{entity.Keys.length ?
<TabsTrigger value="keys" className="flex items-center min-w-[100px] sm:min-w-[120px] px-2 sm:px-4 py-2 text-xs sm:text-sm truncate data-[state=active]:bg-gray-50 data-[state=active]:shadow-sm transition-all duration-200">
<KeyRound className="mr-2 h-4 w-4 shrink-0" />
<span className="truncate">Keys [{visibleKeyCount}]</span>
</TabsTrigger>
: <></>
}
</TabsList>
<TabsContent value="attributes" className="m-0 p-0">
<Attributes entity={entity} search={search} />
Expand Down
Loading