miasfashion / MiasHR

MIAS Fashion HR web application
0 stars 0 forks source link

Edit Day Time Off Request Stored procedure #127

Closed bk0106 closed 7 months ago

bk0106 commented 8 months ago

Create stored procedure to edit day time off request (CURRENT MHRS system does not have edit. You have to cancel then create new reqeust)

OR keep the old way and do not have edit option. Only cancel Option if status is open

Currently, Rejected -> cancel possible Approved -> cancel not possible says Please email HR Open -> cancel possible if not updated by Paul yet

New, Only Open can be canceled

Requeest History does not show Cancel or status =3

bk0106 commented 8 months ago

if (@pStatusType='CANCEL') begin

    select @iCnt = COUNT(seq)
    from HR_WEB_REQUEST
    where seq = @pSeq
    and (approve_1st_yn = 'N' or approve_2nd_yn = 'N')
    and mhrs_update_yn = 'N'

    if (@iCnt=0)
    begin

        set @sOutput = 'Already approved. Contact HR, Please.';

    end 
    else
    begin       

        update HR_WEB_REQUEST 
            set status = 0, modified_date = GETDATE(), modified_user = @pUser
        where seq = @pSeq;

        set @sOutput = 'Canceled Successfully !';   

    end     

end 

From HR_WebRequestStatusChange 
bk0106 commented 8 months ago

Change the Repository and Controller to use the stored procedure. Task DeleteDayTimeOffRequest(int id)

@pSeq int
@pStatusType ->'CANCEL' @pUser 대부분 유저는 empl Code Paul c는 PAUL CHEONG으로 기록 확인 @pRejectReason = ''

bk0106 commented 8 months ago

To update

  1. Update UI Needed (Same UI as Creating?)
  2. Only Possible when 'OPEN' request hasn't been processed at all
  3. Make sure to change Modified User, date