Merge branch 'development' of gitlab.com:mbugroup/lti-web-client into feat/FE/US-76/TASK-114-129-136-slicing-ui-and-validation-create-edit-daily-recording-growing-form

This commit is contained in:
rstubryan
2025-10-21 10:42:04 +07:00
3 changed files with 38 additions and 10 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
if [[ "$VERCEL_GIT_COMMIT_REF" == "master" || "$VERCEL_GIT_COMMIT_REF" == "development" ]]; then
echo "✅ - Build can proceed"
exit 1
else
echo "🛑 - Build cancelled"
exit 0
fi
+6 -2
View File
@@ -1,7 +1,5 @@
import react from 'react';
import Link from 'next/link';
import { cn } from '@/lib/helper';
import { Color } from '@/types/theme';
@@ -10,6 +8,8 @@ interface ButtonProps extends react.ComponentProps<'button'> {
color?: Color;
href?: string;
isLoading?: boolean;
target?: string;
rel?: string;
}
const Button = ({
@@ -22,6 +22,8 @@ const Button = ({
className,
disabled,
onClick,
target,
rel,
...props
}: ButtonProps) => {
const btnBaseClassName = cn(
@@ -68,6 +70,8 @@ const Button = ({
{href && (
<Link
href={disabled ? '#' : href}
target={target}
rel={rel}
aria-disabled={disabled}
className={cn(
btnBaseClassName,
@@ -1174,14 +1174,27 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
</td>
<td>
{type === 'detail' ? (
<TextInput
readOnly
value={delivery.document_path || '-'}
className={{
wrapper: 'w-full min-w-52 md:w-72 lg:w-80',
}}
name={`deliveries.${idx}.document_path`}
/>
<Button
color='primary'
className='w-full min-w-52 flex items-center justify-center gap-2'
disabled={!delivery.document_path}
href={delivery.document_path ?? undefined}
target='_blank'
rel='noopener noreferrer'
>
{delivery.document_path ? (
<>
<Icon
icon='material-symbols:file-open-outline'
width={20}
height={20}
/>
Lihat Dokumen
</>
) : (
'-'
)}
</Button>
) : (
<FileInput
name={`deliveries.${idx}.document`}