Skip to content

Swf 17 credit health #17

Merged
merged 26 commits into from May 1, 2019
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
38a78cf
radial progress indicators and page-based nav
ahm11003 Feb 13, 2019
5d7cb80
Added Balance, Utilization, and AccountNumber Controllers. Added PLis…
Mar 6, 2019
10e6442
PList Functions
ahm11003 Mar 6, 2019
c212e13
Merge pull request #5 from rrk12005/demo-radial-style-progress-indica…
jod13004 Mar 6, 2019
83e5766
Added Utilization score calculation
Mar 28, 2019
3be3eef
Renamed files to more accurately represent them. Changed wellness rad…
Mar 29, 2019
5a821f7
no message
Mar 29, 2019
a2f3c9d
Merge branch 'master' into SWF-17-credit-health
ahm11003 Apr 9, 2019
9303329
- Functions for utilization and account (temporary) metrics.
Apr 11, 2019
3599c77
SWF-17 remove storyboard segue
ahm11003 Apr 11, 2019
2c07f8e
SWF-17 pass our metrics to page hierarchy
ahm11003 Apr 11, 2019
416c2ea
SWF-17 credit utilization improvements
ahm11003 Apr 17, 2019
3e7ddcd
SWE-17 remove unused classes and files
ahm11003 Apr 17, 2019
8e8dec7
SWF-17 fix logical error leading to bad utilization score
ahm11003 Apr 17, 2019
a5c4ac1
SWF-17 remove unused class
ahm11003 Apr 17, 2019
85fd3e2
SWF-17 new class to display trends in credit utilization
ahm11003 Apr 17, 2019
4f67b56
SWF-17 new image assets, implementation for utilization trend
ahm11003 Apr 17, 2019
23fb930
SWF-17 Added basic details for utilization trends
ahm11003 Apr 17, 2019
80acdbf
Merge branch 'master' into SWF-17-credit-health
ahm11003 Apr 17, 2019
ddbc228
SWF-17 More wellness implementation
ahm11003 Apr 23, 2019
4a55d89
SWF-17 more wellness configuration
ahm11003 Apr 23, 2019
d170909
SWF-17 remove unused code
ahm11003 Apr 23, 2019
433ebac
SWF-17 More wellness implementation and improvements
ahm11003 Apr 23, 2019
17dd1df
SWF-17 metric calculations
ahm11003 Apr 23, 2019
a949599
SWF-17 clean up how we receive data for utilization
ahm11003 Apr 23, 2019
f84701b
SWF-17 new image assets, wellness calculation
ahm11003 Apr 24, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+103 −37
Diff settings

Always

Just for now

Renamed files to more accurately represent them. Changed wellness rad…

…ial indicator to match the others. Added metric for late payments and number of accounts.
  • Loading branch information...
Jonathan Duarte
Jonathan Duarte committed Mar 29, 2019
commit 3be3eefd39bc5c03b7b9dc64712434509dee85e9
@@ -43,15 +43,15 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="105" y="102"/>
<point key="canvasLocation" x="-2047" y="131"/>
</scene>
<!--Wellness Interface Controller-->
<scene sceneID="7P2-y3-sP1">
<objects>
<controller id="FsK-xr-8Fi" customClass="WellnessInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<items>
<label width="1" alignment="center" text="Credit Wellness" textAlignment="center" id="eqA-XH-rlH"/>
<imageView width="1" height="86" alignment="center" verticalAlignment="center" image="progress" contentMode="scaleAspectFit" initiallyAnimated="NO" animationDuration="2" id="aTf-mo-FEr"/>
<imageView width="1" height="86" alignment="center" verticalAlignment="center" image="scores" contentMode="scaleAspectFit" initiallyAnimated="NO" animationDuration="2" id="aTf-mo-FEr"/>
<button width="1" alignment="center" verticalAlignment="bottom" title="Tap For More" id="yYk-gv-I5B">
<fontDescription key="font" type="system" pointSize="13"/>
<connections>
@@ -64,14 +64,14 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="414" y="250"/>
<point key="canvasLocation" x="-1657" y="250"/>
</scene>
<!--Balance Interface Controller-->
<!--Account Num Interface Controller-->
<scene sceneID="jxS-9m-lB7">
<objects>
<controller id="Mki-ad-UCC" customClass="BalanceInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<controller id="Mki-ad-UCC" customClass="AccountNumInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<items>
<label width="1" alignment="left" text="Balance Score" textAlignment="center" id="0ed-0W-LKq"/>
<label width="1" alignment="left" text="Account Score" textAlignment="center" id="0ed-0W-LKq"/>
<imageView width="1" height="120" alignment="center" verticalAlignment="center" image="scores" contentMode="scaleAspectFit" initiallyAnimated="NO" id="RlX-Hj-mTY"/>
</items>
<connections>
@@ -80,7 +80,7 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="706" y="250"/>
<point key="canvasLocation" x="-1365" y="250"/>
</scene>
<!--Utilization Interface Controller-->
<scene sceneID="nMW-YM-Pwh">
@@ -96,22 +96,22 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="962" y="249.5"/>
<point key="canvasLocation" x="-1067" y="250"/>
</scene>
<!--Account Number Interface Controller-->
<!--Consistency Interface Controller-->
<scene sceneID="do4-GS-cad">
<objects>
<controller id="k4M-kn-ZzM" customClass="AccountNumberInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<controller id="k4M-kn-ZzM" customClass="ConsistencyInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<items>
<label width="1" alignment="left" text="Account Score" textAlignment="center" id="5cf-d7-ssN"/>
<label width="1" height="20" alignment="left" text="Payment Score" textAlignment="center" id="5cf-d7-ssN"/>
<imageView width="1" height="120" alignment="center" verticalAlignment="center" image="scores" contentMode="scaleAspectFit" initiallyAnimated="NO" id="XsN-KK-JY4"/>
</items>
<connections>
<outlet property="image4" destination="XsN-KK-JY4" id="fqD-Hx-YuD"/>
</connections>
</controller>
</objects>
<point key="canvasLocation" x="1247" y="250"/>
<point key="canvasLocation" x="-766" y="250"/>
</scene>
<!--Accounts Interface Controller-->
<scene sceneID="5Qe-Th-pL8">
@@ -122,7 +122,7 @@
</items>
</controller>
</objects>
<point key="canvasLocation" x="414" y="-56"/>
<point key="canvasLocation" x="-1657" y="-74"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,57 @@
//
// BalanceInterfaceController.swift
// SynchronyFinancial WatchKit Extension
//
// Created by Jonathan Duarte on 2/18/19.
// Copyright © 2019 Alan Maynard. All rights reserved.
//
import WatchKit
import Foundation


class AccountNumInterfaceController: WKInterfaceController {
var accNum: Int = 3
var didAnimate: Bool = false
var score: Int?


@IBOutlet weak var image2: WKInterfaceImage!
override func awake(withContext context: Any?) {
super.awake(withContext: context)

//Assigns score based on # of accounts
switch accNum {
case 2...3:
score = 50
case 3...4:
score = 75
case 5...10:
score = 100
default:
score = 25
}
}

override func didAppear() {
if !didAnimate {
image2.setImageNamed("scores")
image2.startAnimatingWithImages(in: NSRange(location: 1, length: score ?? 0), duration: 1.5, repeatCount: 1)
didAnimate = true
}
//image2.stopAnimating()
}

override func willDisappear() {
}

override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
}

override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
}
@@ -10,22 +10,35 @@ import WatchKit
import Foundation


class AccountNumberInterfaceController: WKInterfaceController {
class ConsistencyInterfaceController: WKInterfaceController {
var didAnimate: Bool = false
var latePayments: Int = 3
var score: Int?

@IBOutlet weak var image4: WKInterfaceImage!
override func awake(withContext context: Any?) {
super.awake(withContext: context)

//get plist data to generate Account number metric
var plistValues = PlistUtil.readPlist(for: .account)
let accountNum = plistValues.count
print(accountNum)
//Assigns a score based on # of late payments
switch latePayments {
case 1:
score = 80
case 2:
score = 55
case 3:
score = 25
default:
score = 100
}
}

override func didAppear() {
// Called when watch interface is visible to user
image4.setImageNamed("scores")
image4.startAnimatingWithImages(in: NSRange(location: 0, length: 101), duration: 1.5, repeatCount: 1)
if !didAnimate {
image4.setImageNamed("scores")
image4.startAnimatingWithImages(in: NSRange(location: 1, length: score ?? 0), duration: 1.5, repeatCount: 1)
didAnimate = true
}
}

override func willActivate() {
@@ -12,7 +12,7 @@ import Foundation
class UtilizationInterfaceController: WKInterfaceController {
var didAnimate: Bool = false
var util: Double = 0
var score: Int = 0
var score: Int?

@IBOutlet weak var image3: WKInterfaceImage!
override func awake(withContext context: Any?) {
@@ -22,8 +22,8 @@ class UtilizationInterfaceController: WKInterfaceController {
var plistValues = PlistUtil.readPlist(for: .balance)
let balance = plistValues[0][0]
let credit = plistValues[0][1] > 0 ? plistValues[0][1] : 1

util = round((Double(balance)/Double(credit)) * 100)

switch util {
case 0...10:
score = 100
@@ -43,7 +43,7 @@ class UtilizationInterfaceController: WKInterfaceController {
override func didAppear() {
if !didAnimate {
image3.setImageNamed("scores")
image3.startAnimatingWithImages(in: NSRange(location: 1, length: score ), duration: 1.5, repeatCount: 1)
image3.startAnimatingWithImages(in: NSRange(location: 1, length: score ?? 0), duration: 1.5, repeatCount: 1)
didAnimate = true
}
}
@@ -16,8 +16,8 @@ class WellnessInterfaceController: WKInterfaceController {
override func awake(withContext context: Any?) {
super.awake(withContext: context)

image.setImageNamed("progress")
image.startAnimatingWithImages(in: NSRange(location: 0, length: 65), duration: 1.5, repeatCount: 1)
image.setImageNamed("scores")
image.startAnimatingWithImages(in: NSRange(location: 1, length: 65), duration: 1.5, repeatCount: 1)
}

override func willActivate() {
@@ -22,13 +22,12 @@
67BAC287219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 67BAC286219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */; };
67BAC292219E254900713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC291219E254900713FEF /* Assets.xcassets */; };
67C8DD8121ED2A040063A01B /* AccountsInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C8DD7F21ED29FF0063A01B /* AccountsInterfaceController.swift */; };
67C8DD8321ED323B0063A01B /* CircleIndicator.sks in Resources */ = {isa = PBXBuildFile; fileRef = 67C8DD8221ED323B0063A01B /* CircleIndicator.sks */; };
67C8DD8521ED3B5A0063A01B /* WellnessInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C8DD8421ED3B5A0063A01B /* WellnessInterfaceController.swift */; };
9BCE39732227138E00B7A992 /* BalanceInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE39722227138E00B7A992 /* BalanceInterfaceController.swift */; };
9BCE39732227138E00B7A992 /* AccountNumInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE39722227138E00B7A992 /* AccountNumInterfaceController.swift */; };
9BCE39752227712500B7A992 /* BalanceInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9BCE39742227712500B7A992 /* BalanceInfo.plist */; };
9BCE39772227731800B7A992 /* UtilizationfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE39762227731800B7A992 /* UtilizationfaceController.swift */; };
9BCE39792227839B00B7A992 /* AccountNumberInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE39782227839B00B7A992 /* AccountNumberInterfaceController.swift */; };
9BCE39792227839B00B7A992 /* ConsistencyInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE39782227839B00B7A992 /* ConsistencyInterfaceController.swift */; };
9BCE397D222F5A2800B7A992 /* PlistUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE397C222F5A2800B7A992 /* PlistUtil.swift */; };
/* End PBXBuildFile section */

@@ -95,13 +94,12 @@
67BAC28D219E254900713FEF /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
67BAC291219E254900713FEF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
67BAC293219E254900713FEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
67C8DD7F21ED29FF0063A01B /* AccountsInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AccountsInterfaceController.swift; path = "SynchronyFinancial WatchKit Extension/AccountsInterfaceController.swift"; sourceTree = SOURCE_ROOT; };
67C8DD8221ED323B0063A01B /* CircleIndicator.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = CircleIndicator.sks; sourceTree = "<group>"; };
67C8DD8421ED3B5A0063A01B /* WellnessInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WellnessInterfaceController.swift; sourceTree = "<group>"; };
9BCE39722227138E00B7A992 /* BalanceInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BalanceInterfaceController.swift; sourceTree = "<group>"; };
9BCE39722227138E00B7A992 /* AccountNumInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountNumInterfaceController.swift; sourceTree = "<group>"; };
9BCE39742227712500B7A992 /* BalanceInfo.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = BalanceInfo.plist; sourceTree = "<group>"; };
9BCE39762227731800B7A992 /* UtilizationfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilizationfaceController.swift; sourceTree = "<group>"; };
9BCE39782227839B00B7A992 /* AccountNumberInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountNumberInterfaceController.swift; sourceTree = "<group>"; };
9BCE39782227839B00B7A992 /* ConsistencyInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsistencyInterfaceController.swift; sourceTree = "<group>"; };
9BCE397C222F5A2800B7A992 /* PlistUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlistUtil.swift; sourceTree = "<group>"; };
9F53D0FFFE126D2BE8D08B80 /* Pods-SynchronyFinancial WatchKit App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial WatchKit App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial WatchKit App/Pods-SynchronyFinancial WatchKit App.debug.xcconfig"; sourceTree = "<group>"; };
B4F433747E1B9A2ED14BA462 /* Pods-SynchronyFinancial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial/Pods-SynchronyFinancial.debug.xcconfig"; sourceTree = "<group>"; };
@@ -182,10 +180,9 @@
isa = PBXGroup;
children = (
67C8DD8421ED3B5A0063A01B /* WellnessInterfaceController.swift */,
9BCE39722227138E00B7A992 /* BalanceInterfaceController.swift */,
9BCE39722227138E00B7A992 /* AccountNumInterfaceController.swift */,
9BCE39762227731800B7A992 /* UtilizationfaceController.swift */,
9BCE39782227839B00B7A992 /* AccountNumberInterfaceController.swift */,
67C8DD7F21ED29FF0063A01B /* AccountsInterfaceController.swift */,
9BCE39782227839B00B7A992 /* ConsistencyInterfaceController.swift */,
67C8DD8221ED323B0063A01B /* CircleIndicator.sks */,
673F396C21A644460051469E /* MainMenuInterfaceController.swift */,
67BAC28D219E254900713FEF /* ExtensionDelegate.swift */,
@@ -428,12 +425,11 @@
buildActionMask = 2147483647;
files = (
9BCE39772227731800B7A992 /* UtilizationfaceController.swift in Sources */,
67C8DD8121ED2A040063A01B /* AccountsInterfaceController.swift in Sources */,
67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */,
9BCE39792227839B00B7A992 /* AccountNumberInterfaceController.swift in Sources */,
9BCE39792227839B00B7A992 /* ConsistencyInterfaceController.swift in Sources */,
67C8DD8521ED3B5A0063A01B /* WellnessInterfaceController.swift in Sources */,
673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */,
9BCE39732227138E00B7A992 /* BalanceInterfaceController.swift in Sources */,
9BCE39732227138E00B7A992 /* AccountNumInterfaceController.swift in Sources */,
6717460E21F8FCDB00696468 /* Transaction.swift in Sources */,
9BCE397D222F5A2800B7A992 /* PlistUtil.swift in Sources */,
6717460D21F8FCD800696468 /* Account.swift in Sources */,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.