Merge pull request 'Checking all the popups and adding header on it.' (#120) from Kartik_Enhancement#308 into Issue_May_3W
Reviewed-on: #120
This commit is contained in:
commit
0587351cdb
@ -33,25 +33,21 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
|
|||||||
mode: "onChange"
|
mode: "onChange"
|
||||||
});
|
});
|
||||||
|
|
||||||
const onSubmit = ( data ) =>
|
const onSubmit = (data) => {
|
||||||
{
|
|
||||||
let record = { ...data, date: new Date().toLocaleDateString(), latitude: coords.latitude, longitude: coords.longitude, employeeId: modeldata.employeeId, action: modeldata.action, id: modeldata?.id || null }
|
let record = { ...data, date: new Date().toLocaleDateString(), latitude: coords.latitude, longitude: coords.longitude, employeeId: modeldata.employeeId, action: modeldata.action, id: modeldata?.id || null }
|
||||||
if (modeldata.forWhichTab === 1) {
|
if (modeldata.forWhichTab === 1) {
|
||||||
handleSubmitForm(record)
|
handleSubmitForm(record)
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
|
|
||||||
// if ( modeldata?.currentDate && checkIfCurrentDate( modeldata?.currentDate ) )
|
// if ( modeldata?.currentDate && checkIfCurrentDate( modeldata?.currentDate ) )
|
||||||
// {
|
// {
|
||||||
dispatch(markAttendance(record))
|
dispatch(markAttendance(record))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.then( ( data ) =>
|
.then((data) => {
|
||||||
{
|
|
||||||
|
|
||||||
showToast("Attendance Marked Successfully", "success");
|
showToast("Attendance Marked Successfully", "success");
|
||||||
})
|
})
|
||||||
.catch( ( error ) =>
|
.catch((error) => {
|
||||||
{
|
|
||||||
|
|
||||||
showToast(error, "error");
|
showToast(error, "error");
|
||||||
|
|
||||||
@ -71,6 +67,11 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
|
|||||||
|
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center flex-wrap">
|
||||||
|
{modeldata?.checkInTime && !modeldata?.checkOutTime ? 'Check-out :' : 'Check-in :'}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<TimePicker
|
<TimePicker
|
||||||
label="Choose a time"
|
label="Choose a time"
|
||||||
@ -82,7 +83,6 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
|
|||||||
{errors.markTime && <p className="text-danger">{errors.markTime.message}</p>}
|
{errors.markTime && <p className="text-danger">{errors.markTime.message}</p>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label" htmlFor="description">
|
<label className="form-label" htmlFor="description">
|
||||||
Description
|
Description
|
||||||
@ -147,8 +147,7 @@ export const Regularization = ({modeldata,closeModal,handleSubmitForm})=>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const onSubmit = ( data ) =>
|
const onSubmit = (data) => {
|
||||||
{
|
|
||||||
|
|
||||||
let record = { ...data, date: new Date().toLocaleDateString(), latitude: coords.latitude, longitude: coords.longitude, }
|
let record = { ...data, date: new Date().toLocaleDateString(), latitude: coords.latitude, longitude: coords.longitude, }
|
||||||
handleSubmitForm(record)
|
handleSubmitForm(record)
|
||||||
|
@ -70,7 +70,9 @@ const CreateJobRole = ({onClose}) => {
|
|||||||
const maxDescriptionLength = 255;
|
const maxDescriptionLength = 255;
|
||||||
return (<>
|
return (<>
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Create Job Role</label>
|
||||||
|
</div>
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Role</label>
|
<label className="form-label">Role</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
@ -96,7 +96,10 @@ const CreateRole = ({ modalType, onClose }) => {
|
|||||||
return (
|
return (
|
||||||
|
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Create Application Role</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Role</label>
|
<label className="form-label">Role</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
@ -70,6 +70,9 @@ const CreateWorkCategory = ({onClose}) => {
|
|||||||
const maxDescriptionLength = 255;
|
const maxDescriptionLength = 255;
|
||||||
return (<>
|
return (<>
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Create Work Category</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Category Name</label>
|
<label className="form-label">Category Name</label>
|
||||||
|
@ -77,6 +77,9 @@ const EditJobRole = ({data,onClose}) => {
|
|||||||
|
|
||||||
return (<>
|
return (<>
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Edit Job Role</label>
|
||||||
|
</div>
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Role</label>
|
<label className="form-label">Role</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
@ -146,7 +146,9 @@ const EditMaster = ({ master, onClose }) => {
|
|||||||
return (
|
return (
|
||||||
|
|
||||||
<form className="row g-2 " onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2 " onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Edit Application Role</label>
|
||||||
|
</div>
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Role</label>
|
<label className="form-label">Role</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
@ -77,6 +77,10 @@ const EditWorkCategory = ({data,onClose}) => {
|
|||||||
|
|
||||||
return (<>
|
return (<>
|
||||||
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row g-2" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<div className="col-12 col-md-12">
|
||||||
|
<label className="fs-5 text-dark text-center d-flex align-items-center justify-content-center flex-wrap">Edit Work Category</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="col-12 col-md-12">
|
<div className="col-12 col-md-12">
|
||||||
<label className="form-label">Category Name</label>
|
<label className="form-label">Category Name</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user