Skip to content

Commit

Permalink
P-22_1_6 create patient list + creat design
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadaalbalawi committed Jan 6, 2022
1 parent a4808eb commit af9e80a
Show file tree
Hide file tree
Showing 17 changed files with 15,997 additions and 247 deletions.
36 changes: 16 additions & 20 deletions catchBullying.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
18074222277C81000090BDCC /* ImportantNumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18074221277C81000090BDCC /* ImportantNumbersViewController.swift */; };
18074224277D97770090BDCC /* ChatRoom .swift in Sources */ = {isa = PBXBuildFile; fileRef = 18074223277D97770090BDCC /* ChatRoom .swift */; };
18074226277DA00D0090BDCC /* ChatTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18074225277DA00D0090BDCC /* ChatTableViewCell.swift */; };
180DB1A32782574A00FC309C /* ChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A22782574A00FC309C /* ChatViewController.swift */; };
180DB1A52783025F00FC309C /* InformationPatientViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A42783025F00FC309C /* InformationPatientViewController.swift */; };
180DB1A7278327A900FC309C /* ChattViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A6278327A900FC309C /* ChattViewController.swift */; };
180DB1A92783316900FC309C /* MessageCellTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A82783316900FC309C /* MessageCellTableViewCell.swift */; };
180DB1A7278327A900FC309C /* ChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A6278327A900FC309C /* ChatViewController.swift */; };
180DB1A92783316900FC309C /* MessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1A82783316900FC309C /* MessageCell.swift */; };
180DB1AB2783720A00FC309C /* InformationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1AA2783720A00FC309C /* InformationVC.swift */; };
180DB1AD27837DED00FC309C /* DoctorProfileDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1AC27837DED00FC309C /* DoctorProfileDetailsViewController.swift */; };
180DB1B02783D34E00FC309C /* ConversationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180DB1AF2783D34E00FC309C /* ConversationModel.swift */; };
Expand All @@ -30,8 +29,8 @@
181CD88627785DC200E0C105 /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 181CD88527785DC200E0C105 /* CollectionViewCell.swift */; };
182BD464276DBAE600FA32BC /* UserModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182BD463276DBAE600FA32BC /* UserModel.swift */; };
1844C8CA277DC57A00988BCE /* ChatTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1844C8C9277DC57A00988BCE /* ChatTableViewController.swift */; };
184D60A8278443FD009AE8CE /* ListOfPatient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60A7278443FD009AE8CE /* ListOfPatient.swift */; };
184D60AA27844AF9009AE8CE /* listTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60A927844AF9009AE8CE /* listTableViewCell.swift */; };
184D60A8278443FD009AE8CE /* PatientsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60A7278443FD009AE8CE /* PatientsListViewController.swift */; };
184D60AA27844AF9009AE8CE /* PatientsListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60A927844AF9009AE8CE /* PatientsListCell.swift */; };
184D60AC2785028D009AE8CE /* VideoPlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60AB2785028D009AE8CE /* VideoPlayerViewController.swift */; };
184D60AE27850BEA009AE8CE /* PatientProfileDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60AD27850BEA009AE8CE /* PatientProfileDetailsViewController.swift */; };
184D60B127851714009AE8CE /* DoctorAvailableDatesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184D60B027851714009AE8CE /* DoctorAvailableDatesViewController.swift */; };
Expand Down Expand Up @@ -81,10 +80,9 @@
18074221277C81000090BDCC /* ImportantNumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportantNumbersViewController.swift; sourceTree = "<group>"; };
18074223277D97770090BDCC /* ChatRoom .swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ChatRoom .swift"; sourceTree = "<group>"; };
18074225277DA00D0090BDCC /* ChatTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTableViewCell.swift; sourceTree = "<group>"; };
180DB1A22782574A00FC309C /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; };
180DB1A42783025F00FC309C /* InformationPatientViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InformationPatientViewController.swift; sourceTree = "<group>"; };
180DB1A6278327A900FC309C /* ChattViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChattViewController.swift; sourceTree = "<group>"; };
180DB1A82783316900FC309C /* MessageCellTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCellTableViewCell.swift; sourceTree = "<group>"; };
180DB1A6278327A900FC309C /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; };
180DB1A82783316900FC309C /* MessageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCell.swift; sourceTree = "<group>"; };
180DB1AA2783720A00FC309C /* InformationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InformationVC.swift; sourceTree = "<group>"; };
180DB1AC27837DED00FC309C /* DoctorProfileDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoctorProfileDetailsViewController.swift; sourceTree = "<group>"; };
180DB1AF2783D34E00FC309C /* ConversationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationModel.swift; sourceTree = "<group>"; };
Expand All @@ -97,8 +95,8 @@
181CD88527785DC200E0C105 /* CollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; };
182BD463276DBAE600FA32BC /* UserModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserModel.swift; sourceTree = "<group>"; };
1844C8C9277DC57A00988BCE /* ChatTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTableViewController.swift; sourceTree = "<group>"; };
184D60A7278443FD009AE8CE /* ListOfPatient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOfPatient.swift; sourceTree = "<group>"; };
184D60A927844AF9009AE8CE /* listTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = listTableViewCell.swift; sourceTree = "<group>"; };
184D60A7278443FD009AE8CE /* PatientsListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatientsListViewController.swift; sourceTree = "<group>"; };
184D60A927844AF9009AE8CE /* PatientsListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatientsListCell.swift; sourceTree = "<group>"; };
184D60AB2785028D009AE8CE /* VideoPlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPlayerViewController.swift; sourceTree = "<group>"; };
184D60AD27850BEA009AE8CE /* PatientProfileDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatientProfileDetailsViewController.swift; sourceTree = "<group>"; };
184D60B027851714009AE8CE /* DoctorAvailableDatesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoctorAvailableDatesViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -158,10 +156,10 @@
180DB1A1278256FA00FC309C /* Chat */ = {
isa = PBXGroup;
children = (
180DB1A82783316900FC309C /* MessageCellTableViewCell.swift */,
180DB1A82783316900FC309C /* MessageCell.swift */,
18074225277DA00D0090BDCC /* ChatTableViewCell.swift */,
1844C8C9277DC57A00988BCE /* ChatTableViewController.swift */,
180DB1A22782574A00FC309C /* ChatViewController.swift */,
180DB1A6278327A900FC309C /* ChatViewController.swift */,
);
path = Chat;
sourceTree = "<group>";
Expand Down Expand Up @@ -225,14 +223,14 @@
18893E9A2780CE0800C258D7 /* Doctor */ = {
isa = PBXGroup;
children = (
180DB1A6278327A900FC309C /* ChattViewController.swift */,
180DB1AC27837DED00FC309C /* DoctorProfileDetailsViewController.swift */,
181CD8572777248200E0C105 /* DoctorHomeViewController.swift */,
181CD87F277792A300E0C105 /* DoctorProfileViewController.swift */,
18074219277C39EE0090BDCC /* SettingViewController.swift */,
18893EA92781849900C258D7 /* DoctorInformtionViewController.swift */,
180DB1AA2783720A00FC309C /* InformationVC.swift */,
184D60A927844AF9009AE8CE /* listTableViewCell.swift */,
184D60A927844AF9009AE8CE /* PatientsListCell.swift */,
184D60A7278443FD009AE8CE /* PatientsListViewController.swift */,
18893EAB27818A3000C258D7 /* DoctorInformtionCell.swift */,
);
path = Doctor;
Expand Down Expand Up @@ -311,7 +309,6 @@
187BA3112768EBC400CBB7CC /* LoginViewControllerUser.swift */,
189207102769F95F0008B4B7 /* SignUpViewController.swift */,
18C6A917276F19F10056240D /* QuestionsViewController.swift */,
184D60A7278443FD009AE8CE /* ListOfPatient.swift */,
184D60BE2785B36C009AE8CE /* NewFile.swift */,
184D60AB2785028D009AE8CE /* VideoPlayerViewController.swift */,
);
Expand Down Expand Up @@ -414,9 +411,8 @@
18074222277C81000090BDCC /* ImportantNumbersViewController.swift in Sources */,
187BA3122768EBC400CBB7CC /* LoginViewControllerUser.swift in Sources */,
184D60BB2785772D009AE8CE /* CalendarCell.swift in Sources */,
180DB1A32782574A00FC309C /* ChatViewController.swift in Sources */,
18893E9E2781059C00C258D7 /* PatientModel.swift in Sources */,
180DB1A92783316900FC309C /* MessageCellTableViewCell.swift in Sources */,
180DB1A92783316900FC309C /* MessageCell.swift in Sources */,
181CD88427785DA600E0C105 /* OnboardingViewController.swift in Sources */,
18C6A91E276F1C670056240D /* ProfileViewController.swift in Sources */,
18E915EE2767E86B005772AB /* AppDelegate.swift in Sources */,
Expand All @@ -426,15 +422,15 @@
180DB1AB2783720A00FC309C /* InformationVC.swift in Sources */,
18074220277C805A0090BDCC /* ImportantNumbers.swift in Sources */,
181CD8562777225300E0C105 /* UserHomeViewController.swift in Sources */,
180DB1A7278327A900FC309C /* ChattViewController.swift in Sources */,
180DB1A7278327A900FC309C /* ChatViewController.swift in Sources */,
18C6A92D276F41B40056240D /* MainTF.swift in Sources */,
184D60AA27844AF9009AE8CE /* listTableViewCell.swift in Sources */,
184D60AA27844AF9009AE8CE /* PatientsListCell.swift in Sources */,
18893EA22781127D00C258D7 /* PatientInformtionViewController.swift in Sources */,
184D60B527852337009AE8CE /* AppointmentSelectorViewController.swift in Sources */,
18E915F02767E86B005772AB /* SceneDelegate.swift in Sources */,
18893EA82781174100C258D7 /* UIView+.swift in Sources */,
180DB1B02783D34E00FC309C /* ConversationModel.swift in Sources */,
184D60A8278443FD009AE8CE /* ListOfPatient.swift in Sources */,
184D60A8278443FD009AE8CE /* PatientsListViewController.swift in Sources */,
189207112769F95F0008B4B7 /* SignUpViewController.swift in Sources */,
184D60B127851714009AE8CE /* DoctorAvailableDatesViewController.swift in Sources */,
18C6A922276F1E480056240D /* SupportViewController.swift in Sources */,
Expand Down
117 changes: 0 additions & 117 deletions catchBullying/Doctor/ChattViewController.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DoctorProfileDetailsViewController: UIViewController {
}

func gotoChat(conversation: ConversationModel) {
let controller = self.storyboard?.instantiateViewController(identifier: "ChatVC") as! ChattViewController
let controller = self.storyboard?.instantiateViewController(identifier: "ChatVC") as! ChatViewController
controller.conversation = conversation
controller.modalPresentationStyle = .fullScreen
controller.modalTransitionStyle = .flipHorizontal
Expand Down
3 changes: 2 additions & 1 deletion catchBullying/Doctor/InformationVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class InformationVC: UIViewController {
guard let experienceInt = Int(experience) else { return }
guard let description = descriptionField.text else { return }

let updatedProfile = DoctorModel(id: doctorProfile.id,
let updatedProfile = DoctorModel(docID: doctorProfile.docID,
id: doctorProfile.id,
firstName: firstName,
lastName: lastName,
mobileNumber: mobileNumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

class listTableViewCell: UITableViewCell {
class PatientsListCell: UITableViewCell {

@IBOutlet weak var birtDay: UILabel!
@IBOutlet weak var nickname: UILabel!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import UIKit
import Firebase
import FirebaseFirestoreSwift

class ListOfPatient: UIViewController {
class PatientsListViewController: UIViewController {

@IBOutlet weak var tabelView: UITableView!

Expand Down Expand Up @@ -82,14 +82,11 @@ class ListOfPatient: UIViewController {
super.viewDidLoad()
tabelView.delegate = self
tabelView.dataSource = self

}




}

extension ListOfPatient : UITableViewDelegate , UITableViewDataSource {
extension PatientsListViewController : UITableViewDelegate , UITableViewDataSource {

func numberOfSections(in tableView: UITableView) -> Int {
1
Expand All @@ -100,8 +97,14 @@ extension ListOfPatient : UITableViewDelegate , UITableViewDataSource {
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = "placeholder"
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! PatientsListCell
cell.nickname.text = patients[indexPath.row].nickname

let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
dateFormatter.timeStyle = .none

cell.birtDay.text = dateFormatter.string(from: patients[indexPath.row].dateOfBirth!)
return cell
}

Expand Down
3 changes: 0 additions & 3 deletions catchBullying/Doctor/SettingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class SettingViewController: UIViewController {

var data : [ProfileCellModel] = [
ProfileCellModel(title: "Information", icon: "person", color: .systemBlue),
ProfileCellModel(title: "Manage My Profile", icon: "person", color: .systemBlue),
ProfileCellModel(title: "Change Language", icon:"textformat.size.smaller.ja", color: .systemBlue),
ProfileCellModel(title: "Logout", icon: "person", color: .systemRed),
ProfileCellModel(title: "Delete Account", icon: "person", color: .systemRed)
Expand Down Expand Up @@ -75,8 +74,6 @@ extension SettingViewController : UITableViewDelegate , UITableViewDataSource {
switch data[indexPath.row].title {
case "Information":
self.performSegue(withIdentifier: "information", sender: nil)
case "Manage My Profile":
self.performSegue(withIdentifier: "DoctorToQuestions", sender: nil)
case "Change Language":
let url = URL(string: UIApplication.openSettingsURLString)!
UIApplication.shared.open(url)
Expand Down
3 changes: 1 addition & 2 deletions catchBullying/Patient/ImportantNumbersViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ extension ImportantNumbersViewController : UITableViewDelegate , UITableViewData
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
// let data = importantNumbersarray[indexPath.row]
cell.textLabel?.text = importantNumbersarray[indexPath.row].title
cell.detailTextLabel?.text = importantNumbersarray[indexPath.row].phoneNumber
cell.imageView?.image = UIImage(systemName:importantNumbersarray[indexPath.row].icon)
// cell.textLabel?.text = importantNumbersarray[indexPath.row].phoneNumber

return cell
}

Expand Down
5 changes: 5 additions & 0 deletions catchBullying/Patient/InformationPatientViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class InformationPatientViewController: UIViewController {
dateOfBirthField.inputAccessoryView = createToolbar()
}


@IBAction func closeAction(_ sender: Any) {
navigationController?.dismiss(animated: true, completion: nil)
}

@IBAction func saveAction(_ sender: Any) {

guard let nickname = nicknameField.text else { return }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PatientProfileDetailsViewController: UIViewController {
}

func gotoChat(conversation: ConversationModel) {
let controller = self.storyboard?.instantiateViewController(identifier: "ChatVC") as! ChattViewController
let controller = self.storyboard?.instantiateViewController(identifier: "ChatVC") as! ChatViewController
controller.conversation = conversation
controller.modalPresentationStyle = .fullScreen
controller.modalTransitionStyle = .flipHorizontal
Expand Down
Loading

0 comments on commit af9e80a

Please sign in to comment.