Skip to content

Commit

Permalink
Merge pull request #139 from DeveloperAcademy-POSTECH/fix/138-busStop…
Browse files Browse the repository at this point in the history
…Data-modifying

[#138] BusStopData.csv 업데이트 반영하기
  • Loading branch information
dbqls200 authored Dec 3, 2024
2 parents 31f74a8 + 8429d4b commit ed5890a
Show file tree
Hide file tree
Showing 10 changed files with 999 additions and 998 deletions.
9 changes: 4 additions & 5 deletions TMT/TMT.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
5B85B1C22CD91CC000469D03 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B85B1C12CD91CC000469D03 /* HomeView.swift */; };
5BA06D4A2CF38E5400834BBD /* TappedStopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA06D492CF38E1F00834BBD /* TappedStopView.swift */; };
5BA06D4C2CF3A63000834BBD /* PopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA06D4B2CF3A61C00834BBD /* PopoverView.swift */; };
5BA3A5852CE12D8900C2DEA0 /* BusStopData.csv in Resources */ = {isa = PBXBuildFile; fileRef = 5BA3A5842CE12D8900C2DEA0 /* BusStopData.csv */; };
5BCC7CC82CF5BEDB005986BF /* BusStopDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCC7CC72CF5BED4005986BF /* BusStopDetailView.swift */; };
5BD057AA2CFEA376003D9F5A /* BusStopData.csv in Resources */ = {isa = PBXBuildFile; fileRef = 5BD057A92CFEA376003D9F5A /* BusStopData.csv */; };
5BE1BF082CF867590082648D /* NotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE1BF072CF867550082648D /* NotificationManager.swift */; };
5BE1BF5B2CF8C53E0082648D /* ScannedJourneyInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE1BF5A2CF8C53A0082648D /* ScannedJourneyInfoView.swift */; };
5BE1BF5D2CF8C6150082648D /* ScannedJourneyInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE1BF5C2CF8C6100082648D /* ScannedJourneyInfo.swift */; };
Expand Down Expand Up @@ -128,8 +128,8 @@
5B85B1C12CD91CC000469D03 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
5BA06D492CF38E1F00834BBD /* TappedStopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TappedStopView.swift; sourceTree = "<group>"; };
5BA06D4B2CF3A61C00834BBD /* PopoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopoverView.swift; sourceTree = "<group>"; };
5BA3A5842CE12D8900C2DEA0 /* BusStopData.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = BusStopData.csv; sourceTree = "<group>"; };
5BCC7CC72CF5BED4005986BF /* BusStopDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BusStopDetailView.swift; sourceTree = "<group>"; };
5BD057A92CFEA376003D9F5A /* BusStopData.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = BusStopData.csv; sourceTree = "<group>"; };
5BE1BF072CF867550082648D /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
5BE1BF5A2CF8C53A0082648D /* ScannedJourneyInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannedJourneyInfoView.swift; sourceTree = "<group>"; };
5BE1BF5C2CF8C6100082648D /* ScannedJourneyInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannedJourneyInfo.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -449,8 +449,7 @@
D86A9ED52CEC681C00B252F8 /* BusStop */ = {
isa = PBXGroup;
children = (
5B6077222CFD9C630075A026 /* BusRouteCoordinates.csv */,
5BA3A5842CE12D8900C2DEA0 /* BusStopData.csv */,
5BD057A92CFEA376003D9F5A /* BusStopData.csv */,
5B6077DD2CFE20A00075A026 /* BusRouteCoordinates.csv */,
D801A1B82CF2212000AD0D64 /* Test */,
);
Expand Down Expand Up @@ -654,11 +653,11 @@
D86A9EE42CEC696700B252F8 /* GoNaverMap.json in Resources */,
D86A9EE52CEC696700B252F8 /* BusDotIntro.json in Resources */,
D8A1C0962CFA1B5C007D9F3F /* GoNaverMapDark.json in Resources */,
5BD057AA2CFEA376003D9F5A /* BusStopData.csv in Resources */,
D8A1C0972CFA1B5C007D9F3F /* CaptureDark.json in Resources */,
D8A1C0982CFA1B5C007D9F3F /* IntroFinishDark.json in Resources */,
D8A1C0992CFA1B5C007D9F3F /* BusDotIntroDark.json in Resources */,
D86A9EE62CEC696700B252F8 /* IntroFinish.json in Resources */,
5BA3A5852CE12D8900C2DEA0 /* BusStopData.csv in Resources */,
D86739712CA933CE00FFE8ED /* Assets.xcassets in Resources */,
D836618D2CF9A892002A181F /* LaunchLogo.png in Resources */,
);
Expand Down
6 changes: 3 additions & 3 deletions TMT/TMT/Assets.xcassets/Brand/textLeft.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
Expand Down
1 change: 1 addition & 0 deletions TMT/TMT/BusSearch/Models/BusSearchItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct BusStop: Codable, Identifiable {
var stopNameKorean: String? // 정류장명 (한글)
var stopNameRomanized: String? // 정류장명 (로마자 표기)
var stopNameNaver: String? // 정류장명 (네이버맵에서 제공하는 의미 번역)
var stopNameTranslated: String? // 정류장명 (직접 번역한 이름)
var latitude: Double? // x좌표
var longitude: Double? // y좌표
}
5 changes: 3 additions & 2 deletions TMT/TMT/BusSearch/Models/BusSearchModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ final class BusSearchModel: ObservableObject {
stopNameKorean: response[3].isEmpty ? nil : response[3],
stopNameRomanized: response[4].isEmpty ? nil : response[4],
stopNameNaver: response[5].isEmpty ? nil : response[5],
latitude: response[6].isEmpty ? nil : Double(response[6]),
longitude: response[7].isEmpty ? nil : Double(response[7].dropLast(1))))
stopNameTranslated: response[6].isEmpty ? nil : response[6],
latitude: response[7].isEmpty ? nil : Double(response[7]),
longitude: response[8].isEmpty ? nil : Double(response[8].dropLast(1))))
}
}

Expand Down
2 changes: 1 addition & 1 deletion TMT/TMT/Map/Views/BottomSheet/BusStopsSheetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct BusStopRowView: View {
.foregroundStyle(.grey400)

if isPartOfJourney {
Text(stop.stopNameNaver ?? "")
Text(stop.stopNameTranslated ?? "")
.font(.headline) // TODO: 서체
.foregroundStyle(.textDefault)
}
Expand Down
6 changes: 3 additions & 3 deletions TMT/TMT/Map/Views/DestinationCard/BusStopDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct BusStopDetailView: View {
var isEndStopViewVisible: Bool
var stopNameKorean: String
var stopNameRomanized: String
var stopNameNaver: String
var stopNameTranslated: String

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Expand All @@ -35,7 +35,7 @@ struct BusStopDetailView: View {
.foregroundStyle(isEndStopViewVisible ? .grey200 : .grey400)
.font(.system(size: 14, weight: .medium))

Text("\(stopNameNaver)")
Text("\(stopNameTranslated)")
.foregroundStyle(.textDefault)
.font(.system(size: 20, weight: .bold))
}
Expand All @@ -48,6 +48,6 @@ struct BusStopDetailView: View {
BusStopDetailView(
isEndStopViewVisible : true, stopNameKorean: dummy.first!.stopNameKorean ?? "",
stopNameRomanized: dummy.first!.stopNameRomanized ?? "",
stopNameNaver: dummy.first!.stopNameNaver ?? ""
stopNameTranslated: dummy.first!.stopNameTranslated ?? ""
)
}
2 changes: 1 addition & 1 deletion TMT/TMT/Map/Views/DestinationCard/EndStopView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct EndStopView: View {
)
}

BusStopDetailView(isEndStopViewVisible: true, stopNameKorean: busStopDetail.stopNameKorean ?? "", stopNameRomanized: busStopDetail.stopNameRomanized ?? "", stopNameNaver: busStopDetail.stopNameNaver ?? "")
BusStopDetailView(isEndStopViewVisible: true, stopNameKorean: busStopDetail.stopNameKorean ?? "", stopNameRomanized: busStopDetail.stopNameRomanized ?? "", stopNameTranslated: busStopDetail.stopNameTranslated ?? "")
.padding(.horizontal, 16)
.padding(.top, 5)
.padding(.bottom, 11.88)
Expand Down
3 changes: 2 additions & 1 deletion TMT/TMT/Map/Views/MapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ struct MapView: View {
if locationManager.isFirstLoad {
locationManager.findCurrentLocation()
}

searchModel.searchBusStops(byNumber: journeyModel.journeyStops.first?.busNumber ?? "")
searchModel.searchRouteCoordinates(byNumber: journeyModel.journeyStops.first?.busNumber ?? "")

busRouteCoordinates = journeyRouteCoordinates()
print("busRouteCoordinates: \(busRouteCoordinates)")
endStop = journeyModel.journeyStops.last ?? BusStop()
colors = mainColor(remainingStops: locationManager.remainingStops)
}
Expand Down
2 changes: 1 addition & 1 deletion TMT/TMT/Map/Views/TappedStopView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct TappedStopView: View {
var body: some View {
VStack {
GeometryReader { geometry in
BusStopDetailView(isEndStopViewVisible: false, stopNameKorean: tappedStop.stopNameKorean ?? "", stopNameRomanized: tappedStop.stopNameRomanized ?? "", stopNameNaver: tappedStop.stopNameNaver ?? "")
BusStopDetailView(isEndStopViewVisible: false, stopNameKorean: tappedStop.stopNameKorean ?? "", stopNameRomanized: tappedStop.stopNameRomanized ?? "", stopNameTranslated: tappedStop.stopNameTranslated ?? "")
.padding(.horizontal, 16)
.padding(.top, 25)
.padding(.bottom, 14)
Expand Down
Loading

0 comments on commit ed5890a

Please sign in to comment.