package com.b2lmobitech.fieldcloudhrms

import android.os.Bundle
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity

class LeaveDetailsActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_leave_details)

        val leaveType = intent.getStringExtra("leaveType")
        val leaveDate = intent.getStringExtra("leaveDate")
        val days = intent.getIntExtra("days", 0)
        val status = intent.getStringExtra("status")
        val reason = intent.getStringExtra("reason")
        val btnback = findViewById<ImageView>(R.id.btnBack)

        findViewById<TextView>(R.id.txtLeaveType).text = leaveType
        findViewById<TextView>(R.id.txtLeaveDate).text = leaveDate
        findViewById<TextView>(R.id.txtDays).text = days.toString()
        findViewById<TextView>(R.id.txtStatus).text = status
        findViewById<TextView>(R.id.txtReason).text = reason

        btnback.setOnClickListener { finish() }
    }
}
