add additional hardware flag in resource and table view
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { type PlatformLink, type PaymentType, type AuditoryResource, type Skill, type SkillLevel } from '@prisma/client';
|
||||
import { type PlatformLink, type PaymentType, type AuditoryResource, type Skill, type SkillLevel, Manufacturer } from '@prisma/client';
|
||||
import { CurrencyDollarIcon, ArrowPathRoundedSquareIcon } from '@heroicons/react/24/solid';
|
||||
import { ClipboardDocumentListIcon } from '@heroicons/react/24/outline';
|
||||
import Image from 'next/image';
|
||||
@ -78,15 +78,25 @@ export const ResourceInfo = ({resource, showMoreInfo}: {resource: AuditoryResour
|
||||
)
|
||||
}
|
||||
|
||||
const ResourceEntry = ({resource}: {resource: AuditoryResource}) => {
|
||||
const ResourceDescription = ({description}: {description: string}) => {
|
||||
return (
|
||||
<div className="flex flex-col p-2">
|
||||
export const ResourceDescription = ({manufacturer, description}: {manufacturer: null | Manufacturer, description: string}) => {
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
<div className="p-2">
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
{ manufacturer?.required ?
|
||||
<div className="bg-neutral-600 border-t-[2px] border-neutral-700 p-2">
|
||||
<h3 className="text-sm font-bold text-neutral-100">IMPORTANT</h3>
|
||||
<p className="text-sm text-neutral-300">
|
||||
This resource requires additional hardware from the manufacturer.
|
||||
</p>
|
||||
</div>
|
||||
: undefined}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ResourceEntry = ({resource}: {resource: AuditoryResource}) => {
|
||||
const ResourceSkills = ({skills, skillLevels}: {skills: Skill[], skillLevels: SkillLevel[]}) => {
|
||||
const SkillRanking = ({skillLevels}: {skillLevels: SkillLevel[]}) => {
|
||||
return (
|
||||
@ -148,7 +158,7 @@ const ResourceEntry = ({resource}: {resource: AuditoryResource}) => {
|
||||
<ResourceSkills skills={resource.skills} skillLevels={resource.skill_levels} />
|
||||
</td>
|
||||
<td className="align-top hidden sm:table-cell">
|
||||
<ResourceDescription description={resource.description} />
|
||||
<ResourceDescription manufacturer={resource.manufacturer} description={resource.description} />
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
|
Reference in New Issue
Block a user