Lots of changes
This commit is contained in:
parent
3fad13097a
commit
1eb574e682
8
Class.swift
Normal file
8
Class.swift
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// Class.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23605" systemVersion="24C101" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier=""/>
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct CommentView: View {
|
struct CommentFieldView: View {
|
||||||
@Binding var textForComment: String
|
@Binding var textForComment: String
|
||||||
@FocusState private var isFocused: Bool
|
@FocusState private var isFocused: Bool
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct FieldView: View {
|
struct ProfessorAuditoryClassFieldView: View {
|
||||||
@Binding var text: String
|
@Binding var text: String
|
||||||
var nameOfImage: String
|
var nameOfImage: String
|
||||||
var labelForField: String
|
var labelForField: String
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct StartEndTimeView: View {
|
struct StartEndTimeFieldView: View {
|
||||||
@Binding var selectedTime: Date
|
@Binding var selectedTime: Date
|
||||||
var imageName: String
|
var imageName: String
|
||||||
var text: String
|
var text: String
|
||||||
@ -55,5 +55,5 @@ struct StartEndTimeView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
StartEndTimeView(selectedTime: .constant(Date()), imageName: "clock", text: "Начало")
|
StartEndTimeFieldView(selectedTime: .constant(Date()), imageName: "clock", text: "Начало")
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ struct LoadingView: View {
|
|||||||
.ignoresSafeArea()
|
.ignoresSafeArea()
|
||||||
ProgressView()
|
ProgressView()
|
||||||
.progressViewStyle(CircularProgressViewStyle(tint: .secondary))
|
.progressViewStyle(CircularProgressViewStyle(tint: .secondary))
|
||||||
.scaleEffect(1.2)
|
.scaleEffect(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ struct SheetChangeClassView: View {
|
|||||||
NavigationView {
|
NavigationView {
|
||||||
VStack {
|
VStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
Text("Создание новой пары")
|
Text("Редактирвоание пары")
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
@ -24,11 +24,11 @@ struct SheetCreateClassView: View {
|
|||||||
NavigationView {
|
NavigationView {
|
||||||
ScrollView(.vertical, showsIndicators: false) {
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
VStack {
|
VStack {
|
||||||
FieldView(text: $textForNameOfClass, nameOfImage: "book", labelForField: "Предмет")
|
ProfessorAuditoryClassFieldView(text: $textForNameOfClass, nameOfImage: "book", labelForField: "Предмет")
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
FieldView(text: $textForNameOfAuditory, nameOfImage: "mappin.and.ellipse", labelForField: "Корпус-аудитория")
|
ProfessorAuditoryClassFieldView(text: $textForNameOfAuditory, nameOfImage: "mappin.and.ellipse", labelForField: "Корпус-аудитория")
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
FieldView(text: $textForNameOfProfessor, nameOfImage: "book", labelForField: "Преподаватель")
|
ProfessorAuditoryClassFieldView(text: $textForNameOfProfessor, nameOfImage: "book", labelForField: "Преподаватель")
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "calendar")
|
Image(systemName: "calendar")
|
||||||
@ -55,9 +55,9 @@ struct SheetCreateClassView: View {
|
|||||||
}
|
}
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
HStack {
|
HStack {
|
||||||
StartEndTimeView(selectedTime: $selectedStartTime, imageName: "clock", text: "Начало")
|
StartEndTimeFieldView(selectedTime: $selectedStartTime, imageName: "clock", text: "Начало")
|
||||||
Spacer()
|
Spacer()
|
||||||
StartEndTimeView(selectedTime: $selectedEndTime, imageName: "clock.badge.xmark", text: "Конец")
|
StartEndTimeFieldView(selectedTime: $selectedEndTime, imageName: "clock.badge.xmark", text: "Конец")
|
||||||
}
|
}
|
||||||
.frame(height: 40)
|
.frame(height: 40)
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
@ -88,7 +88,7 @@ struct SheetCreateClassView: View {
|
|||||||
)
|
)
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
|
|
||||||
CommentView(textForComment: $textForComment)
|
CommentFieldView(textForComment: $textForComment)
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
@ -1,58 +0,0 @@
|
|||||||
//
|
|
||||||
// TextFiledView.swift
|
|
||||||
// Schedule ICTIS
|
|
||||||
//
|
|
||||||
// Created by G412 on 17.12.2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct TextFiledView: View {
|
|
||||||
@State private var isEditing: Bool = false
|
|
||||||
@State private var text: String = ""
|
|
||||||
@State private var nameOfImage: String = "calendar"
|
|
||||||
@State private var labelForField: String = "Преподаватель"
|
|
||||||
|
|
||||||
@FocusState private var isTextFieldFocused: Bool
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
HStack(spacing: 0) {
|
|
||||||
Image(systemName: nameOfImage)
|
|
||||||
.foregroundColor(Color.gray)
|
|
||||||
.padding(.leading, 12)
|
|
||||||
.padding(.trailing, 7)
|
|
||||||
|
|
||||||
TextField(labelForField, text: $text)
|
|
||||||
.font(.system(size: 18, weight: .regular))
|
|
||||||
.disableAutocorrection(true)
|
|
||||||
.focused($isTextFieldFocused)
|
|
||||||
.onChange(of: isTextFieldFocused) { newValue, oldValue in
|
|
||||||
isEditing = newValue
|
|
||||||
}
|
|
||||||
.submitLabel(.done)
|
|
||||||
|
|
||||||
if isTextFieldFocused {
|
|
||||||
Button {
|
|
||||||
self.text = ""
|
|
||||||
self.isEditing = false
|
|
||||||
isTextFieldFocused = false
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "xmark.circle.fill")
|
|
||||||
.padding()
|
|
||||||
.padding(.trailing, 20)
|
|
||||||
.offset(x: 10)
|
|
||||||
.foregroundColor(.red)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.frame(height: 40)
|
|
||||||
.background(
|
|
||||||
RoundedRectangle(cornerRadius: 10)
|
|
||||||
.fill(.white)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
TextFiledView()
|
|
||||||
}
|
|
33
Schedule ICTIS/Model/ClassModel.swift
Normal file
33
Schedule ICTIS/Model/ClassModel.swift
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// Class.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by Mironov Egor on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import CoreData
|
||||||
|
|
||||||
|
final class ClassModel: NSManagedObject {
|
||||||
|
@NSManaged var auditory: String
|
||||||
|
@NSManaged var professor: String
|
||||||
|
@NSManaged var subject: String
|
||||||
|
@NSManaged var comment: String
|
||||||
|
@NSManaged var notification: String
|
||||||
|
@NSManaged var day: Date
|
||||||
|
@NSManaged var starttime: Date
|
||||||
|
@NSManaged var endtime: Date
|
||||||
|
@NSManaged var important: Bool
|
||||||
|
|
||||||
|
// Здесь мы выполняем дополнительную инициализацию, назначая значения по умолчанию
|
||||||
|
override func awakeFromInsert() {
|
||||||
|
super.awakeFromInsert()
|
||||||
|
|
||||||
|
setPrimitiveValue("", forKey: "auditory")
|
||||||
|
setPrimitiveValue("", forKey: "professor")
|
||||||
|
setPrimitiveValue("", forKey: "subject")
|
||||||
|
setPrimitiveValue("", forKey: "comment")
|
||||||
|
setPrimitiveValue("Нет", forKey: "notification")
|
||||||
|
setPrimitiveValue(false, forKey: "important")
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "ICTIS_logo.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
21
Schedule ICTIS/Preview Content/Assets.xcassets/arrowdown.imageset/Contents.json
vendored
Normal file
21
Schedule ICTIS/Preview Content/Assets.xcassets/arrowdown.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "arrow.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Schedule ICTIS/Preview Content/Assets.xcassets/arrowdown.imageset/arrow.png
vendored
Normal file
BIN
Schedule ICTIS/Preview Content/Assets.xcassets/arrowdown.imageset/arrow.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 221 B |
21
Schedule ICTIS/Preview Content/Assets.xcassets/arrowup.imageset/Contents.json
vendored
Normal file
21
Schedule ICTIS/Preview Content/Assets.xcassets/arrowup.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Vector.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Schedule ICTIS/Preview Content/Assets.xcassets/arrowup.imageset/Vector.png
vendored
Normal file
BIN
Schedule ICTIS/Preview Content/Assets.xcassets/arrowup.imageset/Vector.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 B |
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xF6",
|
||||||
|
"green" : "0xF0",
|
||||||
|
"red" : "0xF1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0xFF",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xA4",
|
||||||
|
"green" : "0x60",
|
||||||
|
"red" : "0x28"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xA4",
|
||||||
|
"green" : "0x60",
|
||||||
|
"red" : "0x28"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0x7A",
|
||||||
|
"red" : "0x00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0xFF",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xD9",
|
||||||
|
"green" : "0xD9",
|
||||||
|
"red" : "0xD9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xD9",
|
||||||
|
"green" : "0xD9",
|
||||||
|
"red" : "0xD9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7D",
|
||||||
|
"green" : "0x7D",
|
||||||
|
"red" : "0x7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7D",
|
||||||
|
"green" : "0x7D",
|
||||||
|
"red" : "0x7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7D",
|
||||||
|
"green" : "0x7D",
|
||||||
|
"red" : "0x7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7D",
|
||||||
|
"green" : "0x7D",
|
||||||
|
"red" : "0x7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7A",
|
||||||
|
"green" : "0x7A",
|
||||||
|
"red" : "0x7A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x7A",
|
||||||
|
"green" : "0x7A",
|
||||||
|
"red" : "0x7A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x84",
|
||||||
|
"green" : "0x80",
|
||||||
|
"red" : "0x80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x84",
|
||||||
|
"green" : "0x80",
|
||||||
|
"red" : "0x80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x0A",
|
||||||
|
"green" : "0x97",
|
||||||
|
"red" : "0x00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0xFF",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x99",
|
||||||
|
"green" : "0x99",
|
||||||
|
"red" : "0x99"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x99",
|
||||||
|
"green" : "0x99",
|
||||||
|
"red" : "0x99"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x00",
|
||||||
|
"green" : "0x00",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x00",
|
||||||
|
"green" : "0x00",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xDE",
|
||||||
|
"green" : "0xE4",
|
||||||
|
"red" : "0x22"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xDE",
|
||||||
|
"green" : "0xE4",
|
||||||
|
"red" : "0x22"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
8
Schedule ICTIS/Provider/ClassProvider.swift
Normal file
8
Schedule ICTIS/Provider/ClassProvider.swift
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// ClassProvider.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
33
Schedule ICTIS/Utilities/Model/Class.swift
Normal file
33
Schedule ICTIS/Utilities/Model/Class.swift
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// Class.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by Mironov Egor on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import CoreData
|
||||||
|
|
||||||
|
final class Class: NSManagedObject {
|
||||||
|
@NSManaged var auditory: String
|
||||||
|
@NSManaged var professor: String
|
||||||
|
@NSManaged var subject: String
|
||||||
|
@NSManaged var comment: String
|
||||||
|
@NSManaged var notification: String
|
||||||
|
@NSManaged var day: Date
|
||||||
|
@NSManaged var starttime: Date
|
||||||
|
@NSManaged var endtime: Date
|
||||||
|
@NSManaged var important: Bool
|
||||||
|
|
||||||
|
// Здесь мы выполняем дополнительную инициализацию, назначая значения по умолчанию
|
||||||
|
override func awakeFromInsert() {
|
||||||
|
super.awakeFromInsert()
|
||||||
|
|
||||||
|
setPrimitiveValue("", forKey: "auditory")
|
||||||
|
setPrimitiveValue("", forKey: "professor")
|
||||||
|
setPrimitiveValue("", forKey: "subject")
|
||||||
|
setPrimitiveValue("", forKey: "comment")
|
||||||
|
setPrimitiveValue("Нет", forKey: "notification")
|
||||||
|
setPrimitiveValue(false, forKey: "important")
|
||||||
|
}
|
||||||
|
}
|
23
Schedule ICTIS/Utilities/Model/ScheduleModel.swift
Normal file
23
Schedule ICTIS/Utilities/Model/ScheduleModel.swift
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// Model.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by Mironov Egor on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
// MARK: - Welcome
|
||||||
|
struct Schedule: Decodable {
|
||||||
|
let table: Table
|
||||||
|
let weeks: [Int]
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Table
|
||||||
|
struct Table: Decodable {
|
||||||
|
let type, name: String
|
||||||
|
let week: Int
|
||||||
|
let group: String
|
||||||
|
let table: [[String]]
|
||||||
|
let link: String
|
||||||
|
}
|
14
Schedule ICTIS/Utilities/Model/TabBarModel.swift
Normal file
14
Schedule ICTIS/Utilities/Model/TabBarModel.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// Tab.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
enum TabBarModel: String, CaseIterable {
|
||||||
|
case schedule = "house"
|
||||||
|
case tasks = "books.vertical"
|
||||||
|
case settings = "gear"
|
||||||
|
}
|
8
Schedule ICTIS/Utilities/Provider/ClassProvider.swift
Normal file
8
Schedule ICTIS/Utilities/Provider/ClassProvider.swift
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// ClassProvider.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
8
Schedule ICTIS/ViewModel/EditClassViewModel.swift
Normal file
8
Schedule ICTIS/ViewModel/EditClassViewModel.swift
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// EditClassViewModel.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
33
Schedule ICTIS/ViewModel/Model/Class.swift
Normal file
33
Schedule ICTIS/ViewModel/Model/Class.swift
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// Class.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by Mironov Egor on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import CoreData
|
||||||
|
|
||||||
|
final class Class: NSManagedObject {
|
||||||
|
@NSManaged var auditory: String
|
||||||
|
@NSManaged var professor: String
|
||||||
|
@NSManaged var subject: String
|
||||||
|
@NSManaged var comment: String
|
||||||
|
@NSManaged var notification: String
|
||||||
|
@NSManaged var day: Date
|
||||||
|
@NSManaged var starttime: Date
|
||||||
|
@NSManaged var endtime: Date
|
||||||
|
@NSManaged var important: Bool
|
||||||
|
|
||||||
|
// Здесь мы выполняем дополнительную инициализацию, назначая значения по умолчанию
|
||||||
|
override func awakeFromInsert() {
|
||||||
|
super.awakeFromInsert()
|
||||||
|
|
||||||
|
setPrimitiveValue("", forKey: "auditory")
|
||||||
|
setPrimitiveValue("", forKey: "professor")
|
||||||
|
setPrimitiveValue("", forKey: "subject")
|
||||||
|
setPrimitiveValue("", forKey: "comment")
|
||||||
|
setPrimitiveValue("Нет", forKey: "notification")
|
||||||
|
setPrimitiveValue(false, forKey: "important")
|
||||||
|
}
|
||||||
|
}
|
23
Schedule ICTIS/ViewModel/Model/ScheduleModel.swift
Normal file
23
Schedule ICTIS/ViewModel/Model/ScheduleModel.swift
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// Model.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by Mironov Egor on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
// MARK: - Welcome
|
||||||
|
struct Schedule: Decodable {
|
||||||
|
let table: Table
|
||||||
|
let weeks: [Int]
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Table
|
||||||
|
struct Table: Decodable {
|
||||||
|
let type, name: String
|
||||||
|
let week: Int
|
||||||
|
let group: String
|
||||||
|
let table: [[String]]
|
||||||
|
let link: String
|
||||||
|
}
|
14
Schedule ICTIS/ViewModel/Model/TabBarModel.swift
Normal file
14
Schedule ICTIS/ViewModel/Model/TabBarModel.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// Tab.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
enum TabBarModel: String, CaseIterable {
|
||||||
|
case schedule = "house"
|
||||||
|
case tasks = "books.vertical"
|
||||||
|
case settings = "gear"
|
||||||
|
}
|
8
Schedule ICTIS/ViewModel/Provider/ClassProvider.swift
Normal file
8
Schedule ICTIS/ViewModel/Provider/ClassProvider.swift
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// ClassProvider.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 18.12.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
final class ViewModel: ObservableObject {
|
final class ScheduleViewModel: ObservableObject {
|
||||||
//MARK: Properties
|
//MARK: Properties
|
||||||
@Published var weekSchedule: Table = Table(
|
@Published var weekSchedule: Table = Table(
|
||||||
type: "",
|
type: "",
|
Loading…
x
Reference in New Issue
Block a user