import 'package:fikoyt_mesaici/apps/mesaici/model/model_hareketler.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_tarih.dart'; import 'package:fikoyt_ui/ui/ui.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; class GirisSecici extends StatelessWidget { const GirisSecici({super.key, required this.kayit}); final Rx? kayit; @override Widget build(BuildContext context) { return Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Obx( () => FikoYTButton( text: kayit?.value?.calismaKarti?.giris != null ? kayit!.value!.calismaKarti!.giris!.formatla("dd MMMM yyyy EEEE HH:mm:ss") : "Buraya Tıklayarak Zaman Seçiniz", textSize: 13, textColor: Theme.of(context).extension()?.textColor, textStrokeColor: Colors.transparent, onPressed: () async { kayit?.value?.calismaKarti?.giris = kayit?.value?.calismaKarti?.giris != null ? await kayit?.value?.calismaKarti?.giris?.tarihSaatSec(context, varsayilanTarihSaat: kayit?.value?.calismaKarti?.giris ?? DateTime.now()) : await DateTime.now().tarihSaatSec(context); kayit?.refresh(); }, ), ), ], ), const SizedBox( height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ FikoYTButton( text: "⏳ Giriş Saati", textSize: 10, edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), textColor: Colors.black, textStrokeColor: Colors.transparent, borderColor: Colors.blue, onPressed: () { kayit?.value?.calismaKarti?.normalGirisiYap(); kayit?.refresh(); }, ), const SizedBox( width: 5, ), FikoYTButton( text: "⏳ Şimdi", textSize: 10, edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), textColor: Colors.black, textStrokeColor: Colors.transparent, borderColor: Colors.blue, onPressed: () { kayit?.value?.calismaKarti?.giris = DateTime.now(); kayit?.refresh(); }, ), ], ), ], ); } }