
import 'package:flutter/material.dart';
import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/tools/h_colors.dart';

import '../../tools/tools.dart';
import 'mine_departure_record.dart';
import 'mine_duty_management.dart';


class MineDepartureListPage extends StatelessWidget {
  const MineDepartureListPage({super.key});



  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppbar(title: "离岗"),
      backgroundColor: h_backGroundColor(),
      body: Column(
        children: [
          GestureDetector(
            child: _setItemWidget("离岗管理"),
            onTap: () {
              pushPage(MineDutyManagementPage(), context);

            },
          ),

          Divider(height: 1, color: Colors.black12),
          GestureDetector(
              child: _setItemWidget("离岗记录"),
              onTap: () {
                // pushPage(MineSignPage(), context);
                pushPage(MineDepartureRecordPage(), context);
              }
          ),

        ],
      ),
    );
  }

  Widget _setItemWidget(final String text) {
    return Container(
      height: 55,
      color: Colors.white,
      child: Padding(
        padding: EdgeInsets.all(15),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(text, style: TextStyle(fontSize: 16)),
            Icon(Icons.chevron_right),
          ],
        ),
      ),
    );
  }
}
