forked from AcaMate/AcaMate_iOS
82 lines
2.6 KiB
Swift
82 lines
2.6 KiB
Swift
//
|
|
// ManagementBoxView.swift
|
|
// AcaMate
|
|
//
|
|
// Created by TAnine on 2/10/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ManagementBoxView: View {
|
|
@StateObject var btnVM = ButtonViewModel()
|
|
@State private var leftBtnID = UUID()
|
|
@State private var rightBtnID = UUID()
|
|
|
|
var body: some View {
|
|
DashBoardView(image: Image(.Icon.edu), title: "학습 관리") {
|
|
|
|
} moreAction: {
|
|
printLog("학습 관리의 더보기")
|
|
}
|
|
}
|
|
}
|
|
|
|
struct MangCellView: View {
|
|
@StateObject var btnVM = ButtonViewModel()
|
|
let summaryMang: SummaryManagement
|
|
@State var ratioBtn = UUID()
|
|
@State var flagBtn = UUID()
|
|
var body: some View {
|
|
VStack(spacing: 8) {
|
|
HStack(spacing: 12) {
|
|
Image(.Icon.management)
|
|
.resizable()
|
|
.frame(width: 24, height: 24, alignment: .center)
|
|
Text("\(summaryMang.title)")
|
|
.font(.nps(size: 20))
|
|
.foregroundStyle(Color(.Text.title))
|
|
Spacer(minLength: 1)
|
|
}
|
|
HStack(spacing: 4) {
|
|
Spacer(minLength: 1)
|
|
Text("\(summaryMang.teacher)")
|
|
.font(.nps(size: 12))
|
|
.foregroundStyle(Color(.Text.detail))
|
|
Text("이름")
|
|
.font(.nps(size: 12))
|
|
.foregroundStyle(Color(.Text.detail))
|
|
}
|
|
|
|
|
|
}
|
|
// 상단 내용은 여까지
|
|
HStack(spacing: 6) {
|
|
HStack(spacing: 10) {
|
|
CircleBtnView(vm: btnVM, id: ratioBtn)
|
|
VStack(spacing: 10) {
|
|
HStack(spacing: 4) {
|
|
Text("학습")
|
|
.font(.nps(size: 16))
|
|
.foregroundStyle(Color(.Text.detail))
|
|
Text("진도")
|
|
.font(.nps(font: .bold, size: 16))
|
|
.foregroundStyle(Color(.Text.detail))
|
|
Spacer(minLength: 1)
|
|
}
|
|
HStack(spacing: 4) {
|
|
Spacer(minLength: 1)
|
|
Text("\(summaryMang.ratio)")
|
|
.font(.nps(font: .bold, size: 24))
|
|
.foregroundStyle(summaryMang.ratio > 70 ? Color(.Other.blue):Color(.Other.red))
|
|
Text("%")
|
|
.font(.nps(font: .bold, size: 20))
|
|
.foregroundStyle(Color(.Text.detail))
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|