Skip to content

Commit

Permalink
Redesign and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Silviu Grijincu committed Jun 7, 2018
1 parent 1f3a826 commit c25124b
Show file tree
Hide file tree
Showing 151 changed files with 1,895 additions and 510 deletions.
16 changes: 8 additions & 8 deletions harta-banilor-publici.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@
3A6925541F8374B800EABAC7 /* LicitatieViewController.swift */,
3A87A6131F7BF5D400F79F1B /* SearchViewController.swift */,
3A5580D91F594178009661D9 /* ApiHelper.swift */,
3AC21DC71F90F6830016BE04 /* CustomInfoWindow.swift */,
3AE335A7201348C200CF0169 /* LaunchScreenViewController.swift */,
3AE5295A201381ED0087BB3A /* InfoViewController.swift */,
3AC21DC71F90F6830016BE04 /* CustomInfoWindow.swift */,
3AC21DC61F90F6830016BE04 /* CustomInfoWindow.xib */,
3AA402EA1F447CDD009490EB /* Main.storyboard */,
3AE529582013730C0087BB3A /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -250,7 +250,7 @@
TargetAttributes = {
3AA402E01F447CDD009490EB = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = 56RHDVP96M;
DevelopmentTeam = A9PHH27GH3;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
Expand Down Expand Up @@ -486,7 +486,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -537,7 +537,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -551,11 +551,11 @@
baseConfigurationReference = F15980CF94420178A3E5FD29 /* Pods-harta-banilor-publici.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 56RHDVP96M;
DEVELOPMENT_TEAM = A9PHH27GH3;
INFOPLIST_FILE = "harta-banilor-publici/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "ro.initiativaromania.harta-banilor-publici";
PRODUCT_BUNDLE_IDENTIFIER = ro.initiativaromania.hartabanilorpublici;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "harta-banilor-publici/harta-banilor-publici-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
Expand All @@ -568,11 +568,11 @@
baseConfigurationReference = 3CD957435C76157D936104F4 /* Pods-harta-banilor-publici.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 56RHDVP96M;
DEVELOPMENT_TEAM = A9PHH27GH3;
INFOPLIST_FILE = "harta-banilor-publici/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "ro.initiativaromania.harta-banilor-publici";
PRODUCT_BUNDLE_IDENTIFIER = ro.initiativaromania.hartabanilorpublici;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "harta-banilor-publici/harta-banilor-publici-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
25 changes: 12 additions & 13 deletions harta-banilor-publici/ApiHelper.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Foundation

struct Institution: Codable {
let id: Int
let id, version: Int
let cui, nume, adresa, judet, uat: String
let longitude, latitude: Double

private enum CodingKeys: String, CodingKey {
case id = "InstitutiePublicaId", cui = "CUI", nume = "Nume"
case adresa = "Adresa", judet = "Judet", uat = "UAT"
case longitude = "long", latitude = "lat"
case longitude = "long", latitude = "lat", version = "version"
}
}

Expand All @@ -23,8 +23,7 @@ struct InstitutionSummary: Codable {

struct InstitutionContract: Codable {
let id: Int
let titluContract, numarContract: String
let valoareRON: Double
let titluContract, numarContract, valoareRON: String

private enum CodingKeys: String, CodingKey {
case id = "ContracteId", numarContract = "NumarContract"
Expand All @@ -35,7 +34,7 @@ struct InstitutionContract: Codable {
struct InstitutionLicitatie: Codable {
let id: Int
let titluContract, numarContract: String
let valoareRON: Double
let valoareRON: String

private enum CodingKeys: String, CodingKey {
case id = "LicitatieID", numarContract = "NumarContract"
Expand All @@ -48,7 +47,7 @@ struct Contract: Codable {
let companieCUI, tipProcedura, institutiePublicaCUI, numarAnuntParticipare: String
let dataAnuntParticipare, tipIncheiereContract, numarContract, dataContract: String
let titluContract, cpvCode: String
let valoareRON, valoareEUR: Double
let valoareRON, valoareEUR: String

private enum CodingKeys: String, CodingKey {
case id = "ContracteId", institutiePublicaID = "InstitutiePublicaID", companieId = "CompanieId"
Expand All @@ -66,7 +65,7 @@ struct Licitatie: Codable {
let subcontractat, numarContract, dataContract: String
let titluContract, cpvCodeID, cpvCode, numarAnuntParticipare, dataAnuntParticipare: String
let valoareEstimataParticipare, monedaValoareEstimataParticipare, depoziteGarantii, modalitatiFinantare: String
let valoareRON, valoareEUR: Double
let valoareRON, valoareEUR: String

private enum CodingKeys: String, CodingKey {
case id = "LicitatiiId", institutiePublicaID = "InstitutiePublicaID"
Expand Down Expand Up @@ -134,7 +133,7 @@ extension String {
}

class ApiHelper {
private let apiURL = "https://hbp-api.azurewebsites.net/api/"
private let apiURL = "https://hbp-api2.azurewebsites.net/api/"

func getInstitutionByID(id: Int, handler: @escaping (Institution, URLResponse?, Error?) -> Void) {
var institution: Institution!
Expand Down Expand Up @@ -526,7 +525,7 @@ class ApiHelper {
func searchInstitution(pattern: String, handler: @escaping ([Institution], URLResponse?, Error?) -> Void) {
var institutionResults: [Institution] = []

let url = self.apiURL + "SearchInstitution/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trailingTrim(.whitespaces).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let url = self.apiURL + "SearchInstitution/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trimmingCharacters(in: .whitespacesAndNewlines).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
print("Searching Institutions: " + url)

let task = URLSession.shared.dataTask(with: URL(string: url)!) { data, response, error in
Expand All @@ -552,7 +551,7 @@ class ApiHelper {
func searchADCompanies(pattern: String, handler: @escaping ([CompanieByInstitution], URLResponse?, Error?) -> Void) {
var companieResults: [CompanieByInstitution] = []

let url = self.apiURL + "SearchADCompany/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trailingTrim(.whitespaces).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let url = self.apiURL + "SearchADCompany/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trimmingCharacters(in: .whitespacesAndNewlines).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
print("Searching AD Companies: " + url)

let task = URLSession.shared.dataTask(with: URL(string: url)!) { data, response, error in
Expand Down Expand Up @@ -581,7 +580,7 @@ class ApiHelper {
func searchTenderCompanies(pattern: String, handler: @escaping ([CompanieByInstitution], URLResponse?, Error?) -> Void) {
var companieResults: [CompanieByInstitution] = []

let url = self.apiURL + "SearchTenderCompany/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trailingTrim(.whitespaces).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let url = self.apiURL + "SearchTenderCompany/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trimmingCharacters(in: .whitespacesAndNewlines).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
print("Searching Tender Companies: " + url)

let task = URLSession.shared.dataTask(with: URL(string: url)!) { data, response, error in
Expand Down Expand Up @@ -610,7 +609,7 @@ class ApiHelper {

func searchContracts(pattern: String, handler: @escaping ([InstitutionContract], URLResponse?, Error?) -> Void) {
var contractResults: [InstitutionContract] = []
let url = self.apiURL + "SearchContract/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trailingTrim(.whitespaces).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let url = self.apiURL + "SearchContract/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trimmingCharacters(in: .whitespacesAndNewlines).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
print("Searching Contracts: " + url)

let task = URLSession.shared.dataTask(with: URL(string: url)!) { data, response, error in
Expand All @@ -636,7 +635,7 @@ class ApiHelper {
func searchLicitatii(pattern: String, handler: @escaping ([InstitutionLicitatie], URLResponse?, Error?) -> Void) {
var licitatieResults: [InstitutionLicitatie] = []

let url = self.apiURL + "SearchTenters/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trailingTrim(.whitespaces).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let url = self.apiURL + "SearchTenters/" + pattern.folding(options: .diacriticInsensitive, locale: .current).trimmingCharacters(in: .whitespacesAndNewlines).addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
print("Searching Licitatii for " + url)

let task = URLSession.shared.dataTask(with: URL(string: url)!) { data, response, error in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small-29@2x.png",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small-29@3x.png",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
Expand Down Expand Up @@ -96,7 +102,7 @@
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "iTunesArtwork@2x.png",
"filename" : "iTunesArtwork@1x.png",
"scale" : "1x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"images" : [
{
"idiom" : "universal",
"filename" : "searchAsset 1.png",
"filename" : "pin.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "searchAsset 1@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "searchAsset 1@3x.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_0.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_10.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_100.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_101.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_102.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_103.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_104.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_105.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_106.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"idiom" : "universal",
"filename" : "splash_107.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading

0 comments on commit c25124b

Please sign in to comment.