From da44e90efe705239ac7419da1874161acb88299a Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 15 Oct 2024 15:23:29 +0700
Subject: <iman> add feature pengajuan tempo

---
 src/lib/pengajuan-tempo/component/Stepper.jsx | 51 +++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 src/lib/pengajuan-tempo/component/Stepper.jsx

(limited to 'src/lib/pengajuan-tempo/component/Stepper.jsx')

diff --git a/src/lib/pengajuan-tempo/component/Stepper.jsx b/src/lib/pengajuan-tempo/component/Stepper.jsx
new file mode 100644
index 00000000..248eeffd
--- /dev/null
+++ b/src/lib/pengajuan-tempo/component/Stepper.jsx
@@ -0,0 +1,51 @@
+import React from 'react';
+
+const Stepper = ({ currentStep, numberOfSteps }) => {
+  const stepLabels = [
+    'Informasi Perusahaan',
+    'Kontak Person',
+    'Pengiriman',
+    'Referensi',
+    'Dokumen',
+    'Konfirmasi',
+  ];
+  console.log('currentStep', currentStep);
+  const activeColor = (index) =>
+    currentStep >= index ? 'bg-red-500' : 'bg-gray-300';
+  const activeColorBullet = (index) =>
+    currentStep >= index ? 'bg-red-500 ' : 'bg-white border-gray-300 border';
+  const isFinalStep = (index) => index === numberOfSteps - 1;
+  const isFirstStep = (index) => index === 0;
+  return (
+    <div className='flex items-center'>
+      {Array.from({ length: numberOfSteps }).map((_, index) => (
+        <React.Fragment key={index}>
+          {isFirstStep(index) ? null : (
+            <div className={`w-48 h-[0.8px] ${activeColor(index)}`}></div>
+          )}
+          <div
+            className={`w-6 h-6 ${
+              currentStep == index
+                ? 'border-red-500 border'
+                : `${activeColorBullet(index)} `
+            }  rounded-full flex justify-center items-center`}
+          >
+            <div className='relative text-xs'>
+              <div className='absolute z-10 -top-14  w-48 h-full  -left-24'>
+                <div
+                  className={`relative w-full max-w-md p-2 text-center ${
+                    currentStep == index ? 'text-red-500' : ''
+                  }  text-nowrap`}
+                >
+                  {stepLabels[index]}
+                </div>
+              </div>
+            </div>
+          </div>
+        </React.Fragment>
+      ))}
+    </div>
+  );
+};
+
+export default Stepper;
-- 
cgit v1.2.3


From 7868be545edebd0b54e0ed0b59bc80361bbf36d6 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 15 Oct 2024 17:01:36 +0700
Subject: <iman> update informasi perusahaan

---
 src/lib/pengajuan-tempo/component/Stepper.jsx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'src/lib/pengajuan-tempo/component/Stepper.jsx')

diff --git a/src/lib/pengajuan-tempo/component/Stepper.jsx b/src/lib/pengajuan-tempo/component/Stepper.jsx
index 248eeffd..e9b49e12 100644
--- a/src/lib/pengajuan-tempo/component/Stepper.jsx
+++ b/src/lib/pengajuan-tempo/component/Stepper.jsx
@@ -9,7 +9,6 @@ const Stepper = ({ currentStep, numberOfSteps }) => {
     'Dokumen',
     'Konfirmasi',
   ];
-  console.log('currentStep', currentStep);
   const activeColor = (index) =>
     currentStep >= index ? 'bg-red-500' : 'bg-gray-300';
   const activeColorBullet = (index) =>
-- 
cgit v1.2.3


From 40c6631086d5bf632fb31427e8adf87de60282d3 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 2 Nov 2024 13:30:21 +0700
Subject: <iman> update mobile

---
 src/lib/pengajuan-tempo/component/Stepper.jsx | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/Stepper.jsx')

diff --git a/src/lib/pengajuan-tempo/component/Stepper.jsx b/src/lib/pengajuan-tempo/component/Stepper.jsx
index e9b49e12..23c27e5a 100644
--- a/src/lib/pengajuan-tempo/component/Stepper.jsx
+++ b/src/lib/pengajuan-tempo/component/Stepper.jsx
@@ -1,6 +1,7 @@
 import React from 'react';
-
+import useDevice from '@/core/hooks/useDevice';
 const Stepper = ({ currentStep, numberOfSteps }) => {
+  const { isDesktop, isMobile } = useDevice();
   const stepLabels = [
     'Informasi Perusahaan',
     'Kontak Person',
@@ -20,7 +21,11 @@ const Stepper = ({ currentStep, numberOfSteps }) => {
       {Array.from({ length: numberOfSteps }).map((_, index) => (
         <React.Fragment key={index}>
           {isFirstStep(index) ? null : (
-            <div className={`w-48 h-[0.8px] ${activeColor(index)}`}></div>
+            <div
+              className={`${isMobile ? 'w-12' : 'w-48'} h-[0.8px] ${activeColor(
+                index
+              )}`}
+            ></div>
           )}
           <div
             className={`w-6 h-6 ${
@@ -30,10 +35,20 @@ const Stepper = ({ currentStep, numberOfSteps }) => {
             }  rounded-full flex justify-center items-center`}
           >
             <div className='relative text-xs'>
-              <div className='absolute z-10 -top-14  w-48 h-full  -left-24'>
+              <div
+                className={`absolute z-10  ${
+                  isMobile
+                    ? `w-12 h-full top-4 ${
+                        isFinalStep(index) ? '-left-16' : '-left-4 -top-14'
+                      }`
+                    : 'w-48 h-full  -left-24'
+                }  `}
+              >
                 <div
                   className={`relative w-full max-w-md p-2 text-center ${
-                    currentStep == index ? 'text-red-500' : ''
+                    currentStep == index
+                      ? 'text-red-500'
+                      : `${isMobile ? 'hidden' : ''}`
                   }  text-nowrap`}
                 >
                   {stepLabels[index]}
-- 
cgit v1.2.3


From b9e64c111f21ac32466fa2a0f095df83ff111252 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 5 Nov 2024 09:11:11 +0700
Subject: <iman> update stepper

---
 src/lib/pengajuan-tempo/component/Stepper.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/Stepper.jsx')

diff --git a/src/lib/pengajuan-tempo/component/Stepper.jsx b/src/lib/pengajuan-tempo/component/Stepper.jsx
index 23c27e5a..539fe3f3 100644
--- a/src/lib/pengajuan-tempo/component/Stepper.jsx
+++ b/src/lib/pengajuan-tempo/component/Stepper.jsx
@@ -32,16 +32,16 @@ const Stepper = ({ currentStep, numberOfSteps }) => {
               currentStep == index
                 ? 'border-red-500 border'
                 : `${activeColorBullet(index)} `
-            }  rounded-full flex justify-center items-center`}
+            }  rounded-full flex justify-center items-center text-nowrap`}
           >
             <div className='relative text-xs'>
               <div
                 className={`absolute z-10  ${
                   isMobile
                     ? `w-12 h-full top-4 ${
-                        isFinalStep(index) ? '-left-16' : '-left-4 -top-14'
+                        isFinalStep(index) ? '-left-16' : '-left-4'
                       }`
-                    : 'w-48 h-full  -left-24'
+                    : 'w-48 h-full -top-14 -left-24'
                 }  `}
               >
                 <div
-- 
cgit v1.2.3


From 6f4ecaa362c2333c59d08f775c13fa1c5bf5e13b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 9 Jan 2025 08:53:25 +0700
Subject: <iman> update tempo

---
 src/lib/pengajuan-tempo/component/Stepper.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/pengajuan-tempo/component/Stepper.jsx')

diff --git a/src/lib/pengajuan-tempo/component/Stepper.jsx b/src/lib/pengajuan-tempo/component/Stepper.jsx
index 539fe3f3..c5efa5bc 100644
--- a/src/lib/pengajuan-tempo/component/Stepper.jsx
+++ b/src/lib/pengajuan-tempo/component/Stepper.jsx
@@ -22,7 +22,7 @@ const Stepper = ({ currentStep, numberOfSteps }) => {
         <React.Fragment key={index}>
           {isFirstStep(index) ? null : (
             <div
-              className={`${isMobile ? 'w-12' : 'w-48'} h-[0.8px] ${activeColor(
+              className={`${isMobile ? 'w-12' : 'w-48'} h-[1px] ${activeColor(
                 index
               )}`}
             ></div>
-- 
cgit v1.2.3

