Hendi 2 rokov pred
rodič
commit
8bfeb9d2e0

BIN
Sirani.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate


+ 17 - 18
Sirani/Base.lproj/Main.storyboard

@@ -298,7 +298,7 @@
                                         <rect key="frame" x="0.0" y="156" width="375" height="481"/>
                                         <subviews>
                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PMN-7G-GEI" userLabel="ResultContainerView">
-                                                <rect key="frame" x="0.0" y="0.0" width="375" height="2114"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="375" height="896"/>
                                                 <subviews>
                                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Box-Pm-gUh" userLabel="ResultTitleLayout">
                                                         <rect key="frame" x="8" y="8" width="359" height="60"/>
@@ -335,7 +335,7 @@
                                                         </constraints>
                                                     </view>
                                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ooQ-Fz-dw6" userLabel="ResultContentLayout">
-                                                        <rect key="frame" x="8" y="68" width="359" height="2030"/>
+                                                        <rect key="frame" x="8" y="68" width="359" height="812"/>
                                                         <subviews>
                                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8wx-QU-Drl" userLabel="Section1">
                                                                 <rect key="frame" x="8" y="16" width="343" height="121"/>
@@ -506,7 +506,7 @@
                                                                 </constraints>
                                                             </view>
                                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="J05-JI-I8U" userLabel="Section3">
-                                                                <rect key="frame" x="8" y="306" width="343" height="1700"/>
+                                                                <rect key="frame" x="8" y="306" width="343" height="482"/>
                                                                 <subviews>
                                                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nama Perangkat" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oa7-DD-Voj" userLabel="Nama Pangkat Title">
                                                                         <rect key="frame" x="8" y="0.0" width="327" height="30"/>
@@ -780,6 +780,7 @@
                                                                 <color key="backgroundColor" red="0.90134269" green="0.93688350919999996" blue="0.96473377940000005" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                                                 <constraints>
                                                                     <constraint firstItem="cN8-NT-ceU" firstAttribute="leading" secondItem="J05-JI-I8U" secondAttribute="leading" constant="8" id="12n-vH-92G"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="2qM-ca-VTW" secondAttribute="bottom" id="13y-cK-HcT"/>
                                                                     <constraint firstAttribute="trailing" secondItem="oa7-DD-Voj" secondAttribute="trailing" constant="8" id="1sx-r6-LTs"/>
                                                                     <constraint firstAttribute="trailing" secondItem="8kX-B2-jnk" secondAttribute="trailing" constant="8" id="1zo-cT-6t4"/>
                                                                     <constraint firstAttribute="trailing" secondItem="BUj-mG-cE2" secondAttribute="trailing" constant="1" id="25v-jV-ku4"/>
@@ -795,7 +796,6 @@
                                                                     <constraint firstItem="crC-GM-VIp" firstAttribute="top" secondItem="FzM-e0-YBX" secondAttribute="bottom" id="ACe-k8-bq2"/>
                                                                     <constraint firstItem="XUS-Vb-rPV" firstAttribute="leading" secondItem="J05-JI-I8U" secondAttribute="leading" constant="8" id="BSg-D9-HVh"/>
                                                                     <constraint firstAttribute="trailing" secondItem="2qM-ca-VTW" secondAttribute="trailing" constant="1" id="Bda-3o-tOt"/>
-                                                                    <constraint firstAttribute="height" constant="1700" id="Deg-uD-d6w"/>
                                                                     <constraint firstAttribute="trailing" secondItem="XUS-Vb-rPV" secondAttribute="trailing" constant="8" id="E0d-6C-wD0"/>
                                                                     <constraint firstItem="osU-cu-Stf" firstAttribute="top" secondItem="crC-GM-VIp" secondAttribute="bottom" id="H3b-YD-ZCi"/>
                                                                     <constraint firstItem="XUS-Vb-rPV" firstAttribute="top" secondItem="BUj-mG-cE2" secondAttribute="bottom" id="HGs-X6-t6H"/>
@@ -961,6 +961,7 @@
                         <segue destination="TiM-EP-4cv" kind="unwind" identifier="unwindToDaftarSertifikatSegueId" unwindAction="unwindToDaftarSertifikatWithSegue:" id="ML5-Ia-jgL"/>
                         <segue destination="TiM-EP-4cv" kind="unwind" identifier="unwindToSertifikatSegueId" unwindAction="unwindToSertifikatWithSegue:" id="U9O-YF-aob"/>
                         <segue destination="TiM-EP-4cv" kind="unwind" identifier="unwindToSertifikatPublicSegueId" unwindAction="unwindToSertifikatPublicWithSegue:" id="NHH-IR-Qhu"/>
+                        <segue destination="TiM-EP-4cv" kind="unwind" identifier="unwindToLabelSegueId" unwindAction="unwindToLabelWithSegue:" id="Dz1-dZ-Lb9"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="CLC-p1-80a" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -1001,7 +1002,7 @@
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <nil key="highlightedColor"/>
                                     </label>
-                                    <view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M6k-pX-njt" userLabel="NotifContainer">
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M6k-pX-njt" userLabel="NotifContainer">
                                         <rect key="frame" x="331" y="37" width="36" height="28"/>
                                         <subviews>
                                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic-notif" translatesAutoresizingMaskIntoConstraints="NO" id="yR5-4P-Uwn">
@@ -1316,7 +1317,7 @@
                                 <rect key="frame" x="0.0" y="100" width="375" height="518"/>
                                 <subviews>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nGh-5X-BXH" userLabel="btnDismissMoreMenu">
-                                        <rect key="frame" x="0.0" y="50" width="375" height="40"/>
+                                        <rect key="frame" x="0.0" y="300" width="375" height="40"/>
                                         <color key="backgroundColor" red="0.086068578064441681" green="0.21121081709861755" blue="0.43152788281440735" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="40" id="Mjz-LW-usM"/>
@@ -1328,7 +1329,7 @@
                                         </connections>
                                     </button>
                                     <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ALy-dJ-oyL" userLabel="HomeMoreMenuScrollView">
-                                        <rect key="frame" x="0.0" y="90" width="375" height="428"/>
+                                        <rect key="frame" x="0.0" y="340" width="375" height="178"/>
                                         <subviews>
                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mPI-P7-NFR" userLabel="HomeMoreMenuContainerView">
                                                 <rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
@@ -1959,7 +1960,7 @@
                                 <constraints>
                                     <constraint firstAttribute="trailing" secondItem="ALy-dJ-oyL" secondAttribute="trailing" id="7Rl-p8-BiZ"/>
                                     <constraint firstItem="ALy-dJ-oyL" firstAttribute="leading" secondItem="SFJ-kn-ORU" secondAttribute="leading" id="AlE-GT-Tks"/>
-                                    <constraint firstItem="nGh-5X-BXH" firstAttribute="top" secondItem="SFJ-kn-ORU" secondAttribute="top" constant="50" id="P4z-6n-hfK"/>
+                                    <constraint firstItem="nGh-5X-BXH" firstAttribute="top" secondItem="SFJ-kn-ORU" secondAttribute="top" constant="300" id="P4z-6n-hfK"/>
                                     <constraint firstAttribute="bottom" secondItem="ALy-dJ-oyL" secondAttribute="bottom" id="PTI-Yb-mxf"/>
                                     <constraint firstItem="nGh-5X-BXH" firstAttribute="leading" secondItem="SFJ-kn-ORU" secondAttribute="leading" id="Zmo-uv-XRA"/>
                                     <constraint firstItem="ALy-dJ-oyL" firstAttribute="top" secondItem="nGh-5X-BXH" secondAttribute="bottom" id="eAQ-e1-3Dq"/>
@@ -4024,7 +4025,7 @@
                                             <action selector="onBtnBackTap:" destination="x9Q-g3-t6w" eventType="touchUpInside" id="prU-fg-En2"/>
                                         </connections>
                                     </button>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Aplikasi" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5up-4c-gPJ">
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Daftar Aplikasi" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5up-4c-gPJ">
                                         <rect key="frame" x="72" y="16" width="247" height="24"/>
                                         <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -4175,9 +4176,6 @@
                                                         </label>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nama Pemohon :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dgK-UU-KuR" userLabel="CustNameTitle">
                                                             <rect key="frame" x="8" y="88" width="109" height="16"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="51" id="uSy-m8-BGl"/>
-                                                            </constraints>
                                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
                                                             <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <nil key="highlightedColor"/>
@@ -4883,7 +4881,7 @@
                                             <action selector="onBtnBackTap:" destination="qMr-WK-CP5" eventType="touchUpInside" id="mMl-vH-kQ3"/>
                                         </connections>
                                     </button>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6ZP-2x-Zcl">
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Daftar Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6ZP-2x-Zcl">
                                         <rect key="frame" x="72" y="16" width="247" height="24"/>
                                         <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -5050,8 +5048,8 @@
                                                             <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Brand :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IKW-o7-vSl" userLabel="BrandTitle">
-                                                            <rect key="frame" x="8" y="154.5" width="51" height="16"/>
+                                                        <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nama Pemasaran :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IKW-o7-vSl" userLabel="BrandTitle">
+                                                            <rect key="frame" x="8" y="154.5" width="120" height="16"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="51" id="Etu-gP-vLw"/>
                                                             </constraints>
@@ -5060,7 +5058,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="This Is Brand" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fru-TN-BnG" userLabel="Brand">
-                                                            <rect key="frame" x="63" y="154.5" width="272" height="16"/>
+                                                            <rect key="frame" x="132" y="154.5" width="203" height="16"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="16" id="gqz-MU-VLk"/>
                                                             </constraints>
@@ -5323,6 +5321,7 @@
                         <outlet property="subTitleLabel" destination="SOv-zT-biA" id="F82-26-bR7"/>
                         <segue destination="Whr-GJ-Fxp" kind="presentation" identifier="searchLabelSegueId" modalPresentationStyle="fullScreen" id="xgo-ts-ODt"/>
                         <segue destination="0A5-dO-Zvn" kind="unwind" identifier="unwindLabelToHomeSegueId" unwindAction="unwindToHomeWithSegue:" id="LkQ-EV-h7I"/>
+                        <segue destination="wLH-bE-PwM" kind="presentation" identifier="labelDetailSegueId" modalPresentationStyle="fullScreen" id="9FY-cj-Pe8"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="4E5-iw-AVy" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
@@ -5911,7 +5910,7 @@
                                             <segue destination="iKq-nk-v3g" kind="unwind" unwindAction="unwindToHomeWithSegue:" id="ew0-U5-jbK"/>
                                         </connections>
                                     </button>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sertifikat" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FMa-WD-imE">
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Daftar Sertifikat" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FMa-WD-imE">
                                         <rect key="frame" x="72" y="16" width="247" height="24"/>
                                         <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -25608,7 +25607,7 @@
     <inferredMetricsTieBreakers>
         <segue reference="pgo-8x-SnY"/>
         <segue reference="6xD-yH-Auw"/>
-        <segue reference="lWp-qC-755"/>
+        <segue reference="9FY-cj-Pe8"/>
     </inferredMetricsTieBreakers>
     <resources>
         <image name="calendar.badge.clock" catalog="system" width="128" height="109"/>

+ 6 - 1
Sirani/Model/Label.swift

@@ -24,8 +24,10 @@ struct Label {
     private(set) public var model: String
     private(set) public var merk: String
     private(set) public var berlaku: String
+    private(set) public var statusBerlaku: String
+    private(set) public var statusBgColor: String
     
-    init (nomor: String, cust_name: String, eqp_name: String, lic_id: Int, brand: String, lic_date: String, lic_no: String, exp_date: String, models: String, plg_id: Int, apl_id: Int, negara: String, model: String, merk: String, berlaku: String) {
+    init (nomor: String, cust_name: String, eqp_name: String, lic_id: Int, brand: String, lic_date: String, lic_no: String, exp_date: String, models: String, plg_id: Int, apl_id: Int, negara: String, model: String, merk: String, berlaku: String, statusBerlaku: String, statusBgColor: String) {
         self.nomor = nomor
         self.cust_name = cust_name
         self.eqp_name = eqp_name
@@ -41,5 +43,8 @@ struct Label {
         self.model = model
         self.negara = negara
         self.berlaku = berlaku
+        self.berlaku = berlaku
+        self.statusBerlaku = statusBerlaku
+        self.statusBgColor = statusBgColor
     }
 }

+ 4 - 4
Sirani/Utils/MenuListData.swift

@@ -22,9 +22,9 @@ class MenuListData {
     let menuUtamaCellNewId = "menuUtamaNewCellId"
     let moreMenuUtamaNewCellId = "moreMenuUtamaNewCellId"
     private let menuUtamaNewItems = [
-        MenuItem(segueId: "SertifikatSegueId", icon: "menu-utama-daftar-sertifikat.png", name: "Sertifikat", totalNotif: 0),
-        MenuItem(segueId: "AplikasiSegueId", icon: "menu-utama-tarif-sertifikat.png", name: "Aplikasi", totalNotif: 0),
-        MenuItem(segueId: "LabelSegueId", icon: "menu-utama-informasi-sertifikat.png", name: "Label", totalNotif: 0)
+        MenuItem(segueId: "AplikasiSegueId", icon: "menu-aplikasi-semua.png", name: "Daftar Aplikasi", totalNotif: 0),
+        MenuItem(segueId: "SertifikatSegueId", icon: "menu-utama-daftar-sertifikat.png", name: "Daftar Sertifikat", totalNotif: 0),
+        MenuItem(segueId: "LabelSegueId", icon: "menu-daftar-rhu.png", name: "Daftar Label", totalNotif: 0)
     ]
     func getMenuUtamaNewData(userRoleId: String) -> [MenuItem] {
         return menuUtamaNewItems
@@ -35,7 +35,7 @@ class MenuListData {
     let moreMenuUtamaCellId = "moreMenuUtamaCellId"
     private let menuUtamaItems = [
 //        MenuItem(segueId: "DaftarSertifikatSegueId", icon: "menu-utama-daftar-sertifikat.png", name: "Daftar Sertifikat", totalNotif: 0),
-        MenuItem(segueId: "SertifikatPublicSegueId", icon: "menu-utama-daftar-sertifikat.png", name: "Sertifikat", totalNotif: 0),
+        MenuItem(segueId: "SertifikatPublicSegueId", icon: "menu-utama-daftar-sertifikat.png", name: "Daftar Sertifikat", totalNotif: 0),
         MenuItem(segueId: "TarifSertifikatSegueId", icon: "menu-utama-tarif-sertifikat.png", name: "Tarif Sertifikat", totalNotif: 0),
         MenuItem(segueId: "InformasiSertifikasiSegueId", icon: "menu-utama-informasi-sertifikat.png", name: "Informasi Sertifikasi", totalNotif: 0),
         MenuItem(segueId: "BalaiUjiSegueId", icon: "menu-utama-balai-uji.png", name: "Balai Uji", totalNotif: 0)

+ 24 - 15
Sirani/View/Label/LabelCell.swift

@@ -87,23 +87,12 @@ class LabelCell: UITableViewCell {
 
         lblStatus?.layer.cornerRadius = 6
         lblStatus?.layer.masksToBounds = true
-        
-        switch labelData.berlaku {
-            case "0":
-                status = "Tidak Berlaku"
-                lblStatus.backgroundColor = UIColor.red
-            case "1":
-                status = "Berlaku"
-                lblStatus.backgroundColor = UIColor.green
-            case "3":
-                status = "Revisi"
-                lblStatus.backgroundColor = UIColor.orange
-            default:
-                lblStatus.backgroundColor = UIColor.white
+                
+        lblStatus.text = labelData.statusBerlaku
+        if let statusColor = UIColor(hexString: labelData.statusBgColor) {
+            lblStatus.backgroundColor = statusColor
         }
         
-        lblStatus.text = status
-        
         self.dataLabel = labelData
     }
     
@@ -112,3 +101,23 @@ class LabelCell: UITableViewCell {
     }
 
 }
+
+extension UIColor {
+    convenience init?(hexString: String) {
+        var hexSanitized = hexString.trimmingCharacters(in: .whitespacesAndNewlines)
+        hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "")
+
+        var rgb: UInt64 = 0
+
+        guard Scanner(string: hexSanitized).scanHexInt64(&rgb) else {
+            return nil
+        }
+
+        self.init(
+            red: CGFloat((rgb & 0xFF0000) >> 16) / 255.0,
+            green: CGFloat((rgb & 0x00FF00) >> 8) / 255.0,
+            blue: CGFloat(rgb & 0x0000FF) / 255.0,
+            alpha: 1.0
+        )
+    }
+}

+ 3 - 1
Sirani/View/Label/LabelPresenter.swift

@@ -53,7 +53,9 @@ class LabelPresenter {
                                     negara: item["negara"].stringValue,
                                     model: item["model"].stringValue,
                                     merk: item["merk"].stringValue,
-                                    berlaku: item["berlaku"].stringValue
+                                    berlaku: item["berlaku"].stringValue,
+                                    statusBerlaku: item["StatusBerlaku"].stringValue,
+                                    statusBgColor: item["StatusBgColor"].stringValue
                                 )
                                 label.append(labelData)
                             }

+ 10 - 1
Sirani/View/Label/LabelVC.swift

@@ -34,6 +34,8 @@ class LabelVC: UIViewController {
     private var page: Int = 1
     private var status: String = "label_all"
     private var search: String = ""
+    private var kode: Int?
+    private var isLabel: Bool = true
     
     // Others
     private var loading = false
@@ -184,7 +186,8 @@ extension LabelVC: LabelViewDelegate {
 // UITableController Protocols
 extension LabelVC: UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate, LabelCellDelegate {
     func openLabelDetail(data: Label?) {
-        print(data?.apl_id)
+        self.kode = data?.lic_id
+        performSegue(withIdentifier: "labelDetailSegueId", sender: self)
     }
 
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
@@ -272,6 +275,12 @@ extension LabelVC: SearchLabelDelegate {
             let destinationVC: SearchLabelVC = segue.destination as! SearchLabelVC
             destinationVC.delegate = self
         }
+        
+        if let detailLabelVC = segue.destination as? QRScannerVC {
+            detailLabelVC.kode = kode
+            detailLabelVC.isLabel = isLabel
+        }
+
     }
     
 }

+ 4 - 2
Sirani/View/ScanQR/Scanner/QRScannerVC.swift

@@ -70,6 +70,7 @@ class QRScannerVC: UIViewController {
     var kode : Int?
     var isSertifikatNew = false
     var isSertifikatPublic = false
+    var isLabel = false
     
     // View Lifecycles
     override var preferredStatusBarStyle: UIStatusBarStyle {
@@ -195,11 +196,12 @@ class QRScannerVC: UIViewController {
     @IBAction func onBtnBackTap(_ sender: Any) {
         if(kode != nil)
         {
-            print("AJ \(isSertifikatPublic)")
             if(isSertifikatNew){
                 performSegue(withIdentifier: "unwindToSertifikatSegueId", sender: self)
             }else if(isSertifikatPublic){
                 performSegue(withIdentifier: "unwindToSertifikatPublicSegueId", sender: self)
+            }else if(isLabel){
+                performSegue(withIdentifier: "unwindToLabelSegueId", sender: self)
             }else{
                 performSegue(withIdentifier: "unwindToDaftarSertifikatSegueId", sender: self)
             }
@@ -324,7 +326,7 @@ extension QRScannerVC: AVCaptureMetadataOutputObjectsDelegate {
                 qrCodeFrameView?.frame = barCodeObject!.bounds
                 
                 if metadataObj.stringValue != nil {
-                    if let url = URL(string: metadataObj.stringValue ?? "") {                        
+                    if let url = URL(string: metadataObj.stringValue ?? "") {
                         let lic_id = url.lastPathComponent
                         
                         onQrDataAvailable(decodedString: lic_id)

+ 1 - 1
Sirani/View/Sertifikat/SertifikatPrivate/SertifikatViewController.swift

@@ -151,7 +151,7 @@ extension SertifikatViewController: SertifikatViewDelegate {
 extension SertifikatViewController: UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate, SertifikatNewCellDelegate {
 
     func openSertifikatDetail(data: CertificateData?) {
-        self.kode = data?.apl_id
+        self.kode = data?.lic_id
         performSegue(withIdentifier: "sertifikatNewDetailSegueId", sender: self)
     }