Darkmod ayarları düzenlendi.

This commit is contained in:
Sedat Öztürk 2026-05-24 00:53:56 +03:00
parent 6262baa6f1
commit 6ed1c2dabc
8 changed files with 97 additions and 66 deletions

View file

@ -240,7 +240,7 @@ const FormEdit = () => {
{/* SAĞ TARAF */} {/* SAĞ TARAF */}
{listFormValues.isTenant && ( {listFormValues.isTenant && (
<Badge <Badge
className="font-semibold" className="font-semibold dark:bg-red-500 dark:text-white"
content="Bu bir MULTI TENANT form'dur, veri kaybı olmaması için, sorgularda TENANTID content="Bu bir MULTI TENANT form'dur, veri kaybı olmaması için, sorgularda TENANTID
parametresini kullanmayı unutmayınız." parametresini kullanmayı unutmayınız."
innerClass="p-1 bg-red-50 text-red-500" innerClass="p-1 bg-red-50 text-red-500"

View file

@ -457,7 +457,7 @@ function FormFields({
<Tr <Tr
className={classNames( className={classNames(
'cursor-pointer', 'cursor-pointer',
field.id === row?.id ? 'bg-sozsoft-active' : '', field.id === row?.id ? 'bg-sozsoft-active dark:bg-gray-600' : '',
)} )}
onClick={(e: any) => { onClick={(e: any) => {
setRow(field) setRow(field)

View file

@ -110,10 +110,10 @@ export function WorkflowCanvas({
return ( return (
<div <div
ref={canvasRef} ref={canvasRef}
className="relative max-h-[68vh] min-h-[620px] overflow-auto rounded-lg border border-gray-200" className="relative max-h-[68vh] min-h-[620px] overflow-auto rounded-lg border border-gray-200 bg-white [--grid-color:#edf1f6] dark:border-gray-700 dark:bg-gray-950 dark:[--grid-color:#243244]"
style={{ style={{
backgroundImage: backgroundImage:
'linear-gradient(#edf1f6 1px, transparent 1px), linear-gradient(90deg, #edf1f6 1px, transparent 1px)', 'linear-gradient(var(--grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-color) 1px, transparent 1px)',
backgroundSize: '24px 24px', backgroundSize: '24px 24px',
}} }}
tabIndex={0} tabIndex={0}
@ -121,12 +121,12 @@ export function WorkflowCanvas({
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
> >
{pendingLink && ( {pendingLink && (
<div className="sticky left-2.5 top-2.5 z-50 m-2.5 inline-flex min-h-[34px] items-center rounded-md border border-[#8bb3f1] bg-[#eff6ff] px-3 text-[13px] text-blue-800 shadow-lg"> <div className="sticky left-2.5 top-2.5 z-50 m-2.5 inline-flex min-h-[34px] items-center rounded-md border border-[#8bb3f1] bg-[#eff6ff] px-3 text-[13px] text-blue-800 shadow-lg dark:border-blue-500/60 dark:bg-blue-900/40 dark:text-blue-100">
{outcomeLabel(pendingLink.outcome)} çıkışı seçildi. Hedef akışı adımına tıklayın. {outcomeLabel(pendingLink.outcome)} çıkışı seçildi. Hedef akışı adımına tıklayın.
</div> </div>
)} )}
{currentCriteria.length === 0 && ( {currentCriteria.length === 0 && (
<div className="sticky left-[18px] top-[18px] z-30 inline-grid max-w-[360px] gap-1 rounded-lg border border-[#cfd6e2] bg-white/95 p-3.5 text-[#475467] shadow-lg"> <div className="sticky left-[18px] top-[18px] z-30 inline-grid max-w-[360px] gap-1 rounded-lg border border-[#cfd6e2] bg-white/95 p-3.5 text-[#475467] shadow-lg dark:border-gray-700 dark:bg-gray-900/95 dark:text-gray-300">
<span> <span>
Üstteki butonlardan adım ekleyin, sonra çıkış etiketleriyle bağlantıları kurun. Üstteki butonlardan adım ekleyin, sonra çıkış etiketleriyle bağlantıları kurun.
</span> </span>
@ -293,10 +293,10 @@ function FlowNode({
ref={setNodeRef} ref={setNodeRef}
type="button" type="button"
className={classNames( className={classNames(
'absolute z-40 grid h-32 w-44 touch-none content-start justify-items-start gap-1 rounded-lg border-2 border-[#667085] bg-white p-2.5 text-left text-slate-700 shadow-lg', 'absolute z-40 grid h-32 w-44 touch-none content-start justify-items-start gap-1 rounded-lg border-2 border-[#667085] bg-white p-2.5 text-left text-slate-700 shadow-lg dark:border-gray-600 dark:bg-gray-900 dark:text-gray-200',
{ {
'border-blue-600 outline outline-[3px] outline-blue-600/20': selected, 'border-blue-600 outline outline-[3px] outline-blue-600/20': selected,
'border-green-600 bg-green-50 shadow-[0_0_0_4px_rgba(22,163,74,0.18),0_10px_24px_rgba(22,101,52,0.14)]': 'border-green-600 bg-green-50 shadow-[0_0_0_4px_rgba(22,163,74,0.18),0_10px_24px_rgba(22,101,52,0.14)] dark:bg-green-900/20':
active, active,
'h-[158px] border-amber-600': item.kind === 'Compare', 'h-[158px] border-amber-600': item.kind === 'Compare',
'border-violet-600': item.kind === 'Approval', 'border-violet-600': item.kind === 'Approval',
@ -330,8 +330,8 @@ function FlowNode({
> >
<span <span
className={classNames('inline-flex items-center gap-1.5 text-xs', { className={classNames('inline-flex items-center gap-1.5 text-xs', {
'text-green-800': active, 'text-green-800 dark:text-green-300': active,
'text-slate-500': !active, 'text-slate-500 dark:text-gray-400': !active,
})} })}
> >
<Icon /> <Icon />
@ -340,7 +340,13 @@ function FlowNode({
<strong className="break-words text-sm leading-tight [overflow-wrap:anywhere]"> <strong className="break-words text-sm leading-tight [overflow-wrap:anywhere]">
{item.title} {item.title}
</strong> </strong>
<small className={active ? 'text-green-800' : 'text-slate-500'}>{item.id}</small> <small
className={
active ? 'text-green-800 dark:text-green-300' : 'text-slate-500 dark:text-gray-400'
}
>
{item.id}
</small>
<div className="mt-0.5 flex max-w-full flex-wrap gap-[3px]"> <div className="mt-0.5 flex max-w-full flex-wrap gap-[3px]">
{(getNodeOutcomes(item) as WorkflowOutcome[]).map((outcome) => ( {(getNodeOutcomes(item) as WorkflowOutcome[]).map((outcome) => (
<span <span
@ -348,9 +354,9 @@ function FlowNode({
role="button" role="button"
tabIndex={0} tabIndex={0}
className={classNames( className={classNames(
'inline-flex min-h-[19px] max-w-full cursor-crosshair items-center overflow-hidden rounded-full border border-[#cfd6e2] bg-white px-1.5 py-px text-[10px] leading-tight text-[#344054] [text-overflow:ellipsis] [white-space:nowrap]', 'inline-flex min-h-[19px] max-w-full cursor-crosshair items-center overflow-hidden rounded-full border border-[#cfd6e2] bg-white px-1.5 py-px text-[10px] leading-tight text-[#344054] [text-overflow:ellipsis] [white-space:nowrap] dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200',
{ {
'border-blue-600 bg-[#eaf2ff] text-blue-600': 'border-blue-600 bg-[#eaf2ff] text-blue-600 dark:border-blue-400 dark:bg-blue-900/40 dark:text-blue-200':
pendingLink?.sourceId === item.id && pendingLink?.outcome === outcome.field, pendingLink?.sourceId === item.id && pendingLink?.outcome === outcome.field,
}, },
)} )}
@ -388,10 +394,10 @@ function FlowNode({
<span <span
key={`${outcome.field}-port`} key={`${outcome.field}-port`}
className={classNames( className={classNames(
'absolute z-10 h-1 w-1 rounded-full border border-[#475467] bg-white shadow-[0_0_0_1.5px_rgba(255,255,255,0.95)]', 'absolute z-10 h-1 w-1 rounded-full border border-[#475467] bg-white shadow-[0_0_0_1.5px_rgba(255,255,255,0.95)] dark:border-gray-300 dark:bg-gray-900 dark:shadow-[0_0_0_1.5px_rgba(17,24,39,0.95)]',
portSideClass(side), portSideClass(side),
{ {
'border-blue-600 bg-blue-100': 'border-blue-600 bg-blue-100 dark:border-blue-300 dark:bg-blue-800':
pendingLink?.sourceId === item.id && pendingLink?.outcome === outcome.field, pendingLink?.sourceId === item.id && pendingLink?.outcome === outcome.field,
}, },
)} )}
@ -407,7 +413,7 @@ function FlowNode({
<span <span
key={`${link.key}-incoming-port`} key={`${link.key}-incoming-port`}
className={classNames( className={classNames(
'absolute h-1 w-1 rounded-full border border-slate-500 bg-slate-50 shadow-[0_0_0_1.5px_rgba(255,255,255,0.95)]', 'absolute h-1 w-1 rounded-full border border-slate-500 bg-slate-50 shadow-[0_0_0_1.5px_rgba(255,255,255,0.95)] dark:border-gray-300 dark:bg-gray-900 dark:shadow-[0_0_0_1.5px_rgba(17,24,39,0.95)]',
portSideClass(side), portSideClass(side),
)} )}
style={getPortStyle( style={getPortStyle(
@ -466,7 +472,7 @@ function Arrow({
/> />
<path <path
className={classNames( className={classNames(
'pointer-events-none stroke-white/95 [stroke-linecap:butt] [stroke-linejoin:round] [stroke-width:7] group-hover:stroke-[var(--link-soft)] group-hover:[stroke-width:10] group-focus-visible:stroke-[var(--link-soft)] group-focus-visible:[stroke-width:10]', 'pointer-events-none stroke-white/95 [stroke-linecap:butt] [stroke-linejoin:round] [stroke-width:7] group-hover:stroke-[var(--link-soft)] group-hover:[stroke-width:10] group-focus-visible:stroke-[var(--link-soft)] group-focus-visible:[stroke-width:10] dark:stroke-gray-950/95',
{ 'stroke-[var(--link-soft)] [stroke-width:10]': isActive }, { 'stroke-[var(--link-soft)] [stroke-width:10]': isActive },
)} )}
d={d} d={d}
@ -506,13 +512,13 @@ function ArrowLabel({
return ( return (
<g <g
className={classNames(linkToneClass(tone), { className={classNames(linkToneClass(tone), {
'[&_text]:text-[11px] [&_text]:font-bold [&_rect]:fill-white [&_rect]:[stroke-width:1.5]': '[&_text]:text-[11px] [&_text]:font-bold [&_rect]:fill-white [&_rect]:[stroke-width:1.5] dark:[&_rect]:fill-gray-900':
isActive, isActive,
})} })}
data-flow-link data-flow-link
> >
<rect <rect
className="fill-white/90 stroke-[var(--link-soft)] [stroke-width:1]" className="fill-white/90 stroke-[var(--link-soft)] [stroke-width:1] dark:fill-gray-900/90"
x={labelPoint.x - labelWidth / 2} x={labelPoint.x - labelWidth / 2}
y={labelPoint.y - 12} y={labelPoint.y - 12}
width={labelWidth} width={labelWidth}

View file

@ -73,8 +73,7 @@ export function WorkflowCriteria({
const validColumns = new Set(compareColumnOptions.map((option) => option.value)) const validColumns = new Set(compareColumnOptions.map((option) => option.value))
let changed = false let changed = false
const nextOutcomes = (formValues.compareOutcomes || []).map( const nextOutcomes = (formValues.compareOutcomes || []).map((outcome: CompareOutcomeDto) => ({
(outcome: CompareOutcomeDto) => ({
...outcome, ...outcome,
conditions: (outcome.conditions || []).map((condition) => { conditions: (outcome.conditions || []).map((condition) => {
if (validColumns.has(condition.compareColumn)) { if (validColumns.has(condition.compareColumn)) {
@ -84,8 +83,7 @@ export function WorkflowCriteria({
changed = true changed = true
return { ...condition, compareColumn: defaultCompareColumn } return { ...condition, compareColumn: defaultCompareColumn }
}), }),
}), }))
)
const nextCompareColumn = validColumns.has(formValues.compareColumn) const nextCompareColumn = validColumns.has(formValues.compareColumn)
? formValues.compareColumn ? formValues.compareColumn
@ -189,7 +187,10 @@ export function WorkflowCriteria({
const connectionSummary = criteriaConnectionSummary(item, criteria) const connectionSummary = criteriaConnectionSummary(item, criteria)
return ( return (
<Tr key={item.id} className={classNames(isSelected && 'bg-blue-50')}> <Tr
key={item.id}
className={classNames(isSelected && 'bg-blue-50 dark:bg-blue-900/20')}
>
<Td> <Td>
<div className="flex-wrap inline-flex xl:flex items-center gap-2"> <div className="flex-wrap inline-flex xl:flex items-center gap-2">
<Button <Button
@ -269,7 +270,10 @@ export function WorkflowCriteria({
</FormItem> </FormItem>
{(formValues.kind === 'Start' || formValues.kind === 'Inform') && ( {(formValues.kind === 'Start' || formValues.kind === 'Inform') && (
<FormItem label={translate('::App.Listform.ListformField.NextOnStart')} asterisk> <FormItem
label={translate('::App.Listform.ListformField.NextOnStart')}
asterisk
>
{targetSelect( {targetSelect(
formValues.nextOnStart, formValues.nextOnStart,
(value) => setField('nextOnStart', value), (value) => setField('nextOnStart', value),
@ -280,14 +284,20 @@ export function WorkflowCriteria({
{formValues.kind === 'Approval' && ( {formValues.kind === 'Approval' && (
<> <>
<FormItem label={translate('::App.Listform.ListformField.NextOnApprove')} asterisk> <FormItem
label={translate('::App.Listform.ListformField.NextOnApprove')}
asterisk
>
{targetSelect( {targetSelect(
formValues.nextOnApprove, formValues.nextOnApprove,
(value) => setField('nextOnApprove', value), (value) => setField('nextOnApprove', value),
true, true,
)} )}
</FormItem> </FormItem>
<FormItem label={translate('::App.Listform.ListformField.NextOnReject')} asterisk> <FormItem
label={translate('::App.Listform.ListformField.NextOnReject')}
asterisk
>
{targetSelect( {targetSelect(
formValues.nextOnReject, formValues.nextOnReject,
(value) => setField('nextOnReject', value), (value) => setField('nextOnReject', value),
@ -304,7 +314,7 @@ export function WorkflowCriteria({
<h6> <h6>
{translate('::App.Listform.ListformField.CompareOutcomes')} {translate('::App.Listform.ListformField.CompareOutcomes')}
{isLoadingSelectCommandColumns && ( {isLoadingSelectCommandColumns && (
<span className="ml-2 text-xs font-normal text-gray-400"> <span className="ml-2 text-xs font-normal text-gray-400 dark:text-gray-500">
{translate('::App.Listform.ListformField.LoadingColumns')} {translate('::App.Listform.ListformField.LoadingColumns')}
</span> </span>
)} )}
@ -330,10 +340,17 @@ export function WorkflowCriteria({
<div className="grid gap-3"> <div className="grid gap-3">
{(formValues.compareOutcomes || []).map( {(formValues.compareOutcomes || []).map(
(outcome: CompareOutcomeDto, index: number) => ( (outcome: CompareOutcomeDto, index: number) => (
<div key={index} className="rounded border border-gray-200 p-3"> <div
key={index}
className="rounded border border-gray-200 bg-white p-3 dark:border-gray-700 dark:bg-gray-900"
>
<div className="flex flex-col-11 items-center gap-2 mb-2"> <div className="flex flex-col-11 items-center gap-2 mb-2">
<strong className="flex-[5]">{translate('::App.Listform.ListformField.Status')} {index + 1}</strong> <strong className="flex-[5]">
<strong className="flex-[5]">{translate('::App.Listform.ListformField.Connection')}</strong> {translate('::App.Listform.ListformField.Status')} {index + 1}
</strong>
<strong className="flex-[5]">
{translate('::App.Listform.ListformField.Connection')}
</strong>
<span className="flex-1" /> <span className="flex-1" />
</div> </div>
<div className="flex flex-col-11 items-center gap-2"> <div className="flex flex-col-11 items-center gap-2">
@ -439,7 +456,7 @@ export function WorkflowCriteria({
</div> </div>
</Dialog.Body> </Dialog.Body>
<Dialog.Footer className="flex justify-end gap-2 border-t pt-3 mt-1"> <Dialog.Footer className="flex justify-end gap-2 border-t border-gray-200 pt-3 mt-1 dark:border-gray-700">
<Button type="button" variant="plain" disabled={busy} onClick={closeDialog}> <Button type="button" variant="plain" disabled={busy} onClick={closeDialog}>
{translate('::Cancel')} {translate('::Cancel')}
</Button> </Button>
@ -463,16 +480,9 @@ export function WorkflowCriteria({
function isNumericDataType(dataType?: string | null) { function isNumericDataType(dataType?: string | null) {
const normalized = (dataType || '').toLowerCase() const normalized = (dataType || '').toLowerCase()
return [ return ['int', 'decimal', 'numeric', 'money', 'float', 'real', 'double', 'number'].some(
'int', (typeName) => normalized.includes(typeName),
'decimal', )
'numeric',
'money',
'float',
'real',
'double',
'number',
].some((typeName) => normalized.includes(typeName))
} }
function SelectField({ function SelectField({

View file

@ -86,7 +86,7 @@ export function WorkflowDesigner({
return ( return (
<div className="min-h-screen"> <div className="min-h-screen">
<main className="grid"> <main className="grid">
<section className="relative min-w-0 rounded-lg border border-gray-200 bg-white p-4 max-[1080px]:pr-4"> <section className="relative min-w-0 rounded-lg border border-gray-200 bg-white p-4 max-[1080px]:pr-4 dark:border-gray-700 dark:bg-gray-900">
<div className="mb-3.5 flex items-center justify-between gap-4 max-[720px]:flex-col max-[720px]:items-stretch"> <div className="mb-3.5 flex items-center justify-between gap-4 max-[720px]:flex-col max-[720px]:items-stretch">
<DesignerTabs activeTab={designerTab} onChange={onSetDesignerTab} /> <DesignerTabs activeTab={designerTab} onChange={onSetDesignerTab} />
@ -176,7 +176,10 @@ function DesignerToolbar({
<div className="flex flex-wrap justify-end gap-2"> <div className="flex flex-wrap justify-end gap-2">
<button <button
type="button" type="button"
className={classNames(designerButtonClass, 'border-gray-300 bg-white text-slate-700')} className={classNames(
designerButtonClass,
'border-gray-300 bg-white text-slate-700 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700',
)}
disabled={busy} disabled={busy}
title="Demo akışı yükle" title="Demo akışı yükle"
onClick={onResetDemo} onClick={onResetDemo}
@ -186,7 +189,10 @@ function DesignerToolbar({
</button> </button>
<button <button
type="button" type="button"
className={classNames(designerButtonClass, 'border-blue-600 bg-white text-blue-600')} className={classNames(
designerButtonClass,
'border-blue-600 bg-white text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:bg-gray-800 dark:text-blue-300 dark:hover:bg-blue-900/30',
)}
disabled={busy || currentCriteria.length === 0} disabled={busy || currentCriteria.length === 0}
title="Düğümleri okunabilir şekilde yerleştir" title="Düğümleri okunabilir şekilde yerleştir"
onClick={onFitLayout} onClick={onFitLayout}
@ -196,7 +202,10 @@ function DesignerToolbar({
</button> </button>
<button <button
type="button" type="button"
className={classNames(designerIconButtonClass, 'border-blue-600 bg-white text-blue-600')} className={classNames(
designerIconButtonClass,
'border-blue-600 bg-white text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:bg-gray-800 dark:text-blue-300 dark:hover:bg-blue-900/30',
)}
title="Yakınlaştır" title="Yakınlaştır"
onClick={onZoomIn} onClick={onZoomIn}
> >
@ -204,13 +213,16 @@ function DesignerToolbar({
</button> </button>
<button <button
type="button" type="button"
className={classNames(designerIconButtonClass, 'border-blue-600 bg-white text-blue-600')} className={classNames(
designerIconButtonClass,
'border-blue-600 bg-white text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:bg-gray-800 dark:text-blue-300 dark:hover:bg-blue-900/30',
)}
title="Uzaklaştır" title="Uzaklaştır"
onClick={onZoomOut} onClick={onZoomOut}
> >
<FiZoomOut /> <FiZoomOut />
</button> </button>
<span className="inline-flex min-w-12 items-center justify-center text-[13px] font-bold text-slate-500"> <span className="inline-flex min-w-12 items-center justify-center text-[13px] font-bold text-slate-500 dark:text-gray-400">
{Math.round(zoom * 100)}% {Math.round(zoom * 100)}%
</span> </span>
{kindOptions.map((option) => { {kindOptions.map((option) => {
@ -219,7 +231,10 @@ function DesignerToolbar({
<button <button
key={option.value} key={option.value}
type="button" type="button"
className={classNames(designerButtonClass, 'border-blue-600 bg-white text-blue-600')} className={classNames(
designerButtonClass,
'border-blue-600 bg-white text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:bg-gray-800 dark:text-blue-300 dark:hover:bg-blue-900/30',
)}
disabled={busy} disabled={busy}
onClick={() => onAddCriteria(option.value)} onClick={() => onAddCriteria(option.value)}
> >
@ -249,8 +264,8 @@ function DesignerTabs({
className={classNames( className={classNames(
designerTabClass, designerTabClass,
activeTab === 'flow' activeTab === 'flow'
? 'border-blue-700 bg-blue-700 text-white shadow-sm' ? 'border-blue-700 bg-blue-700 text-white shadow-sm dark:border-blue-500 dark:bg-blue-600'
: 'border-gray-200 bg-white text-slate-600', : 'border-gray-200 bg-white text-slate-600 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700',
)} )}
onClick={() => onChange('flow')} onClick={() => onChange('flow')}
> >
@ -262,8 +277,8 @@ function DesignerTabs({
className={classNames( className={classNames(
designerTabClass, designerTabClass,
activeTab === 'criteria' activeTab === 'criteria'
? 'border-blue-700 bg-blue-700 text-white shadow-sm' ? 'border-blue-700 bg-blue-700 text-white shadow-sm dark:border-blue-500 dark:bg-blue-600'
: 'border-gray-200 bg-white text-slate-600', : 'border-gray-200 bg-white text-slate-600 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700',
)} )}
onClick={() => onChange('criteria')} onClick={() => onChange('criteria')}
> >

View file

@ -30,13 +30,13 @@ const Dashboard: React.FC = () => {
title={translate('::' + 'App.Videoroom.Dashboard')} title={translate('::' + 'App.Videoroom.Dashboard')}
defaultTitle="Erp Platform" defaultTitle="Erp Platform"
></Helmet> ></Helmet>
<div className="flex items-center justify-center p-4 bg-white dark:bg-gray-900 min-h-screen"> <div className="flex items-center justify-center mt-36 bg-white dark:bg-gray-900">
<motion.div <motion.div
initial={{ opacity: 0, y: 20 }} initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }} animate={{ opacity: 1, y: 0 }}
className="text-center w-full max-w-4xl" className="text-center w-full max-w-4xl"
> >
<p className="text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-12"> <p className="text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-4 sm:mb-12">
{translate('::' + 'App.Videoroom.RoleSelector')} {translate('::' + 'App.Videoroom.RoleSelector')}
</p> </p>

View file

@ -288,11 +288,11 @@ const useGridData = (props: {
}) })
.filter((a: any) => { .filter((a: any) => {
if (mode === 'view') { if (mode === 'view') {
return a.canRead && a.allowEditing return a.canRead
} else if (mode === 'new') { } else if (mode === 'new') {
return (a.canCreate || a.canRead) && a.allowAdding return a.canCreate && a.allowAdding
} else if (mode === 'edit') { } else if (mode === 'edit') {
return (a.canUpdate || a.canRead) && a.allowEditing return a.canUpdate && a.allowEditing
} else { } else {
return false return false
} }

View file

@ -19,7 +19,7 @@ const Log = ({ version, date, children }: { version: string; date: string; child
<time className="sm:absolute left-0 translate-y-0.5 inline-flex items-center justify-center text-xs font-semibold uppercase w-20 h-6 mb-3 sm:mb-0 text-emerald-600 bg-emerald-100 rounded-full"> <time className="sm:absolute left-0 translate-y-0.5 inline-flex items-center justify-center text-xs font-semibold uppercase w-20 h-6 mb-3 sm:mb-0 text-emerald-600 bg-emerald-100 rounded-full">
{date} {date}
</time> </time>
<div className="flex items-center text-xl font-bold text-gray-900"> <div className="flex items-center text-xl font-bold text-gray-900 dark:text-white">
<FaTag className="mr-2 text-indigo-500" /> <FaTag className="mr-2 text-indigo-500" />
v{version} v{version}
</div> </div>