Browse Source

notification part finished

v0.17
yajan 2 years ago
parent
commit
7d0d4e580a
  1. 28
      GME Remit/Modules/NotificationList/User Interface/View/NotificationList.storyboard
  2. 3
      GME Remit/Modules/NotificationList/User Interface/View/NotificationListViewController.swift
  3. 4
      GME Remit/Modules/NotificationList/User Interface/View/cell/NotificationListCell.swift
  4. 2
      GME Remit/Supported Files/Assets.xcassets/error.imageset/Contents.json
  5. 32
      GME Remit/Supported Files/Assets.xcassets/error.imageset/error.svg
  6. BIN
      GME Remit/Supported Files/Assets.xcassets/error.imageset/notify-error-color.png

28
GME Remit/Modules/NotificationList/User Interface/View/NotificationList.storyboard

@ -23,7 +23,7 @@
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="8Vs-dd-M7N">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="NotificationListCell" rowHeight="135" id="48E-1p-dMU" customClass="NotificationListCell" customModule="JME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="44.5" width="375" height="135"/>
@ -33,29 +33,29 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bXS-Ld-Zx0">
<rect key="frame" x="24" y="19" width="327" height="97"/>
<rect key="frame" x="24" y="19" width="327" height="104.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ILl-Ee-CC3">
<rect key="frame" x="8" y="8" width="25" height="25"/>
<rect key="frame" x="20" y="12" width="25" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="25" id="Rsz-Ee-S1X"/>
<constraint firstAttribute="height" constant="25" id="eMK-Xv-mPm"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CancelTxn" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h66-Xi-H7V">
<rect key="frame" x="41" y="8" width="278" height="19.5"/>
<rect key="frame" x="65" y="12" width="254" height="19.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" white="0.0" alpha="0.65000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tran ID: 10317685 was successfully cancelled" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="87j-YI-wdX">
<rect key="frame" x="41" y="31.5" width="278" height="36"/>
<rect key="frame" x="65" y="35.5" width="254" height="36"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4/21/2022 12:52:47" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vav-fq-3jz">
<rect key="frame" x="41" y="71.5" width="278" height="17"/>
<rect key="frame" x="65" y="75.5" width="254" height="17"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
@ -65,25 +65,26 @@
<constraints>
<constraint firstAttribute="trailing" secondItem="h66-Xi-H7V" secondAttribute="trailing" constant="8" id="4Ar-Oo-riP"/>
<constraint firstAttribute="trailing" secondItem="Vav-fq-3jz" secondAttribute="trailing" constant="8" id="7aA-OC-VDq"/>
<constraint firstItem="h66-Xi-H7V" firstAttribute="leading" secondItem="ILl-Ee-CC3" secondAttribute="trailing" constant="8" id="DVW-5T-skO"/>
<constraint firstItem="ILl-Ee-CC3" firstAttribute="leading" secondItem="bXS-Ld-Zx0" secondAttribute="leading" constant="8" id="PF3-sf-hIg"/>
<constraint firstItem="ILl-Ee-CC3" firstAttribute="top" secondItem="bXS-Ld-Zx0" secondAttribute="top" constant="8" id="QIO-6J-ZE9"/>
<constraint firstItem="h66-Xi-H7V" firstAttribute="leading" secondItem="ILl-Ee-CC3" secondAttribute="trailing" constant="20" id="DVW-5T-skO"/>
<constraint firstAttribute="bottom" secondItem="Vav-fq-3jz" secondAttribute="bottom" constant="12" id="Dju-Qh-3Qg"/>
<constraint firstItem="ILl-Ee-CC3" firstAttribute="leading" secondItem="bXS-Ld-Zx0" secondAttribute="leading" constant="20" id="PF3-sf-hIg"/>
<constraint firstItem="ILl-Ee-CC3" firstAttribute="top" secondItem="bXS-Ld-Zx0" secondAttribute="top" constant="12" id="QIO-6J-ZE9"/>
<constraint firstItem="87j-YI-wdX" firstAttribute="top" secondItem="h66-Xi-H7V" secondAttribute="bottom" constant="4" id="dxH-74-dFS"/>
<constraint firstItem="87j-YI-wdX" firstAttribute="leading" secondItem="h66-Xi-H7V" secondAttribute="leading" id="gd4-kE-vcj"/>
<constraint firstItem="Vav-fq-3jz" firstAttribute="leading" secondItem="87j-YI-wdX" secondAttribute="leading" id="h4X-8U-Y60"/>
<constraint firstAttribute="trailing" secondItem="87j-YI-wdX" secondAttribute="trailing" constant="8" id="h4g-o5-GsS"/>
<constraint firstItem="h66-Xi-H7V" firstAttribute="top" secondItem="bXS-Ld-Zx0" secondAttribute="top" constant="8" id="ule-Gd-ep1"/>
<constraint firstItem="h66-Xi-H7V" firstAttribute="top" secondItem="bXS-Ld-Zx0" secondAttribute="top" constant="12" id="ule-Gd-ep1"/>
<constraint firstItem="Vav-fq-3jz" firstAttribute="top" secondItem="87j-YI-wdX" secondAttribute="bottom" constant="4" id="ziQ-yZ-QUx"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="bXS-Ld-Zx0" firstAttribute="top" secondItem="FNu-65-aiz" secondAttribute="topMargin" constant="8" id="QX7-nH-1AF"/>
<constraint firstAttribute="bottomMargin" secondItem="bXS-Ld-Zx0" secondAttribute="bottom" constant="8" id="aSP-9p-tFU"/>
<constraint firstItem="bXS-Ld-Zx0" firstAttribute="leading" secondItem="FNu-65-aiz" secondAttribute="leadingMargin" constant="8" id="tge-ld-WMl"/>
<constraint firstAttribute="trailingMargin" secondItem="bXS-Ld-Zx0" secondAttribute="trailing" constant="8" id="tgw-Oi-Pbe"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="cardView" destination="bXS-Ld-Zx0" id="dit-vP-DpH"/>
<outlet property="statusDate" destination="Vav-fq-3jz" id="vI4-Gv-7p8"/>
@ -99,7 +100,7 @@
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" name="ThemeSubBackground"/>
<constraints>
<constraint firstItem="8Vs-dd-M7N" firstAttribute="top" secondItem="y1H-iV-BwG" secondAttribute="bottom" id="0Ep-ga-ecC"/>
<constraint firstItem="8Vs-dd-M7N" firstAttribute="leading" secondItem="9Uc-9s-KgO" secondAttribute="leading" id="Agw-eX-3Ep"/>
@ -118,6 +119,9 @@
</scenes>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<namedColor name="ThemeSubBackground">
<color red="0.93300002813339233" green="0.93300002813339233" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</namedColor>
<namedColor name="ThemeText">
<color red="0.5490196078431373" green="0.58823529411764708" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

3
GME Remit/Modules/NotificationList/User Interface/View/NotificationListViewController.swift

@ -65,13 +65,14 @@ extension NotificationListViewController: UITableViewDelegate, UITableViewDataSo
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "NotificationListCell", for: indexPath) as! NotificationListCell
let item = tableData[indexPath.row]
cell.setupView()
cell.renderData(data: item)
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// return UITableView.automaticDimension
return 115
return 125
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

4
GME Remit/Modules/NotificationList/User Interface/View/cell/NotificationListCell.swift

@ -20,6 +20,10 @@ class NotificationListCell: UITableViewCell {
@IBOutlet weak var statusLabel: UILabel!
@IBOutlet weak var statusImageView: UIImageView!
func setupView() {
cardView.set(cornerRadius: 12)
}
func renderData(data: NotificationList) {
statusLabel.text = data.title
statusDate.text = data.createDate

2
GME Remit/Supported Files/Assets.xcassets/error.imageset/Contents.json

@ -1,7 +1,6 @@
{
"images" : [
{
"filename" : "error.svg",
"idiom" : "universal",
"scale" : "1x"
},
@ -10,6 +9,7 @@
"scale" : "2x"
},
{
"filename" : "notify-error-color.png",
"idiom" : "universal",
"scale" : "3x"
}

32
GME Remit/Supported Files/Assets.xcassets/error.imageset/error.svg

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1920 1080" style="enable-background:new 0 0 1920 1080;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F15A3C;}
.st1{fill:#E33539;}
.st2{fill:#FEFEFE;}
</style>
<g>
<path class="st0" d="M882.03,348.06c25.99,0,51.98,0,77.97,0c-0.01,26.45-0.03,52.91-0.04,79.36c-4.24,0.04-8.48,0.1-12.73,0.13
c-8.62,0.06-13.18,5.31-12.46,13.98c1.25,15.05,2.34,30.11,3.48,45.17c2.02,26.76,4,53.51,6.06,80.27
c0.47,6.07,5.02,10.21,11.16,10.5c1.49,0.07,2.99,0.1,4.49,0.14c0,9.92,0,19.85,0,29.77c-8.99,0.61-15.99,4.52-20.07,12.72
c-6.94,13.93,2.08,31.6,20.07,32.49c0.01,26.46,0.03,52.91,0.04,79.37c-25.99,0-51.98,0-77.97,0c-3.59-1.83-6.27-4.74-9.06-7.53
c-32.45-32.46-64.91-64.92-97.37-97.37c-2.79-2.79-5.7-5.48-7.53-9.06c0-51.98,0-103.97,0-155.95c1.83-3.59,4.74-6.27,7.53-9.06
c32.46-32.45,64.92-64.91,97.37-97.37C875.76,352.8,878.43,349.88,882.03,348.06z"/>
<path class="st1" d="M959.96,607.37c0-9.92,0-19.85,0-29.77c1.12-0.05,2.24-0.13,3.36-0.14c7.68-0.04,11.76-3.73,12.46-11.33
c0.34-3.72,0.61-7.45,0.89-11.18c1.18-15.53,2.35-31.07,3.54-46.6c0.88-11.43,1.79-22.86,2.66-34.29
c0.88-11.56,1.89-23.11,2.51-34.68c0.37-6.97-4.61-11.74-11.57-11.8c-4.61-0.04-9.23-0.1-13.84-0.14
c0.01-26.45,0.03-52.91,0.04-79.36c25.99,0,51.98,0,77.97,0c3.1,1.62,5.67,3.89,8.13,6.36c33.13,33.19,66.28,66.34,99.47,99.47
c2.47,2.47,4.74,5.03,6.36,8.13c0,51.98,0,103.97,0,155.95c-1.63,3.25-4.07,5.84-6.62,8.39c-33.01,32.96-65.99,65.94-98.94,98.94
c-2.55,2.55-5.13,5-8.39,6.63c-25.99,0-51.98,0-77.97,0c-0.01-26.46-0.03-52.91-0.04-79.37c2.49-0.11,4.95-0.42,7.32-1.24
c10.15-3.51,16.39-13.55,15.11-24.36C981.11,616.07,972.08,608.19,959.96,607.37z"/>
<path class="st2" d="M959.96,427.42c4.61,0.05,9.23,0.11,13.84,0.14c6.96,0.06,11.94,4.82,11.57,11.8
c-0.61,11.57-1.63,23.13-2.51,34.68c-0.87,11.43-1.78,22.86-2.66,34.29c-1.19,15.53-2.36,31.07-3.54,46.6
c-0.28,3.73-0.55,7.46-0.89,11.18c-0.69,7.6-4.77,11.28-12.46,11.33c-1.12,0.01-2.24,0.09-3.36,0.14c-1.5-0.05-2.99-0.07-4.49-0.14
c-6.14-0.29-10.69-4.42-11.16-10.5c-2.07-26.75-4.04-53.51-6.06-80.27c-1.14-15.06-2.23-30.12-3.48-45.17
c-0.72-8.67,3.84-13.92,12.46-13.98C951.48,427.52,955.72,427.47,959.96,427.42z"/>
<path class="st2" d="M959.96,607.37c12.13,0.82,21.15,8.7,22.44,19.61c1.28,10.8-4.96,20.85-15.11,24.36
c-2.38,0.82-4.83,1.14-7.32,1.24c-17.99-0.89-27-18.55-20.07-32.49C943.97,611.89,950.97,607.98,959.96,607.37z"/>
</g>
</svg>

BIN
GME Remit/Supported Files/Assets.xcassets/error.imageset/notify-error-color.png

After

Width: 512  |  Height: 512  |  Size: 8.9 KiB

Loading…
Cancel
Save