|
|
|
|
@@ -53,10 +53,11 @@ type ComplexityRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Query struct {
|
|
|
|
|
QueryCheckDistance func(childComplexity int, mStaffID string, mCompanyID string, currentLatitude string, currentLongitude string) int
|
|
|
|
|
SearchStaffByEmail func(childComplexity int, email string) int
|
|
|
|
|
StaffGetByStaffID func(childComplexity int, staffID string) int
|
|
|
|
|
StaffListBySearch func(childComplexity int, search *string, page *int, maxPerPage *int) int
|
|
|
|
|
QueryCheckDistance func(childComplexity int, mStaffID string, mCompanyID string, currentLatitude string, currentLongitude string) int
|
|
|
|
|
QueryCheckTimeAttendance func(childComplexity int, mStaffID string, mCompanyID string, token string) int
|
|
|
|
|
SearchStaffByEmail func(childComplexity int, email string) int
|
|
|
|
|
StaffGetByStaffID func(childComplexity int, staffID string) int
|
|
|
|
|
StaffListBySearch func(childComplexity int, search *string, page *int, maxPerPage *int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Staff struct {
|
|
|
|
|
@@ -91,6 +92,15 @@ type ComplexityRoot struct {
|
|
|
|
|
Unit func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TransAbsensiCheckTimeAttendanceResponse struct {
|
|
|
|
|
IsAbsenClockIn func(childComplexity int) int
|
|
|
|
|
IsAbsenClockOut func(childComplexity int) int
|
|
|
|
|
JamClockIn func(childComplexity int) int
|
|
|
|
|
JamClockOut func(childComplexity int) int
|
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
|
Status func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TransAbsensiResponse struct {
|
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
|
Status func(childComplexity int) int
|
|
|
|
|
@@ -107,6 +117,7 @@ type QueryResolver interface {
|
|
|
|
|
StaffGetByStaffID(ctx context.Context, staffID string) (*model.Staff, error)
|
|
|
|
|
StaffListBySearch(ctx context.Context, search *string, page *int, maxPerPage *int) ([]*model.Staff, error)
|
|
|
|
|
QueryCheckDistance(ctx context.Context, mStaffID string, mCompanyID string, currentLatitude string, currentLongitude string) (*model.TransAbsensiCheckDistanceResponse, error)
|
|
|
|
|
QueryCheckTimeAttendance(ctx context.Context, mStaffID string, mCompanyID string, token string) (*model.TransAbsensiCheckTimeAttendanceResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type executableSchema struct {
|
|
|
|
|
@@ -176,6 +187,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.QueryCheckDistance(childComplexity, args["M_StaffID"].(string), args["M_CompanyID"].(string), args["CurrentLatitude"].(string), args["CurrentLongitude"].(string)), true
|
|
|
|
|
|
|
|
|
|
case "Query.queryCheckTimeAttendance":
|
|
|
|
|
if e.complexity.Query.QueryCheckTimeAttendance == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
args, err := ec.field_Query_queryCheckTimeAttendance_args(context.TODO(), rawArgs)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return 0, false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.QueryCheckTimeAttendance(childComplexity, args["M_StaffID"].(string), args["M_CompanyID"].(string), args["token"].(string)), true
|
|
|
|
|
|
|
|
|
|
case "Query.searchStaffByEmail":
|
|
|
|
|
if e.complexity.Query.SearchStaffByEmail == nil {
|
|
|
|
|
break
|
|
|
|
|
@@ -373,6 +396,48 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckDistanceResponse.Unit(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.is_absen_clock_in":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.IsAbsenClockIn == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.IsAbsenClockIn(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.is_absen_clock_out":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.IsAbsenClockOut == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.IsAbsenClockOut(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.jam_clock_in":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.JamClockIn == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.JamClockIn(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.jam_clock_out":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.JamClockOut == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.JamClockOut(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.message":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.Message == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.Message(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiCheckTimeAttendanceResponse.status":
|
|
|
|
|
if e.complexity.TransAbsensiCheckTimeAttendanceResponse.Status == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.TransAbsensiCheckTimeAttendanceResponse.Status(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "TransAbsensiResponse.message":
|
|
|
|
|
if e.complexity.TransAbsensiResponse.Message == nil {
|
|
|
|
|
break
|
|
|
|
|
@@ -544,10 +609,23 @@ type TransAbsensiCheckDistanceResponse {
|
|
|
|
|
unit: String
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# response waktu absen masuk dan pulang
|
|
|
|
|
type TransAbsensiCheckTimeAttendanceResponse {
|
|
|
|
|
status: String
|
|
|
|
|
message: String
|
|
|
|
|
jam_clock_in: String
|
|
|
|
|
jam_clock_out: String
|
|
|
|
|
is_absen_clock_in: String
|
|
|
|
|
is_absen_clock_out: String
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# query
|
|
|
|
|
extend type Query {
|
|
|
|
|
# untuk cek distance dengan fungsi distance_v2 di database
|
|
|
|
|
queryCheckDistance(M_StaffID:String!, M_CompanyID:String!,CurrentLatitude:String!, CurrentLongitude:String!) : TransAbsensiCheckDistanceResponse!
|
|
|
|
|
|
|
|
|
|
# untuk check waktu absen masuk dan pulang
|
|
|
|
|
queryCheckTimeAttendance(M_StaffID:String!, M_CompanyID:String!, token:String!) : TransAbsensiCheckTimeAttendanceResponse!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# mutation
|
|
|
|
|
@@ -802,6 +880,39 @@ func (ec *executionContext) field_Query_queryCheckDistance_args(ctx context.Cont
|
|
|
|
|
return args, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Query_queryCheckTimeAttendance_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
|
var err error
|
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
|
var arg0 string
|
|
|
|
|
if tmp, ok := rawArgs["M_StaffID"]; ok {
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("M_StaffID"))
|
|
|
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
args["M_StaffID"] = arg0
|
|
|
|
|
var arg1 string
|
|
|
|
|
if tmp, ok := rawArgs["M_CompanyID"]; ok {
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("M_CompanyID"))
|
|
|
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
args["M_CompanyID"] = arg1
|
|
|
|
|
var arg2 string
|
|
|
|
|
if tmp, ok := rawArgs["token"]; ok {
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("token"))
|
|
|
|
|
arg2, err = ec.unmarshalNString2string(ctx, tmp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
args["token"] = arg2
|
|
|
|
|
return args, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Query_searchStaffByEmail_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
|
var err error
|
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
|
@@ -1442,6 +1553,75 @@ func (ec *executionContext) fieldContext_Query_queryCheckDistance(ctx context.Co
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_queryCheckTimeAttendance(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Query_queryCheckTimeAttendance(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return ec.resolvers.Query().QueryCheckTimeAttendance(rctx, fc.Args["M_StaffID"].(string), fc.Args["M_CompanyID"].(string), fc.Args["token"].(string))
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.TransAbsensiCheckTimeAttendanceResponse)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNTransAbsensiCheckTimeAttendanceResponse2ᚖcomᚗsismedikaᚗcomᚗabsensiᚋgraphᚋmodelᚐTransAbsensiCheckTimeAttendanceResponse(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_Query_queryCheckTimeAttendance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "Query",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: true,
|
|
|
|
|
IsResolver: true,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
switch field.Name {
|
|
|
|
|
case "status":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_status(ctx, field)
|
|
|
|
|
case "message":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_message(ctx, field)
|
|
|
|
|
case "jam_clock_in":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_in(ctx, field)
|
|
|
|
|
case "jam_clock_out":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_out(ctx, field)
|
|
|
|
|
case "is_absen_clock_in":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_in(ctx, field)
|
|
|
|
|
case "is_absen_clock_out":
|
|
|
|
|
return ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_out(ctx, field)
|
|
|
|
|
}
|
|
|
|
|
return nil, fmt.Errorf("no field named %q was found under type TransAbsensiCheckTimeAttendanceResponse", field.Name)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
err = ec.Recover(ctx, r)
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
if fc.Args, err = ec.field_Query_queryCheckTimeAttendance_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return fc, err
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -2532,6 +2712,252 @@ func (ec *executionContext) fieldContext_TransAbsensiCheckDistanceResponse_unit(
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_status(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_status(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.Status, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_message(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_message(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.Message, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_jam_clock_in(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_in(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.JamClockIn, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_in(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_jam_clock_out(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_out(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.JamClockOut, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_jam_clock_out(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_in(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_in(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.IsAbsenClockIn, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_in(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_out(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiCheckTimeAttendanceResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_out(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.IsAbsenClockOut, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_out(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "TransAbsensiCheckTimeAttendanceResponse",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiResponse_status(ctx context.Context, field graphql.CollectedField, obj *model.TransAbsensiResponse) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_TransAbsensiResponse_status(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -4564,6 +4990,28 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|
|
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
|
|
|
case "queryCheckTimeAttendance":
|
|
|
|
|
field := field
|
|
|
|
|
|
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
res = ec._Query_queryCheckTimeAttendance(ctx, field)
|
|
|
|
|
if res == graphql.Null {
|
|
|
|
|
atomic.AddUint32(&fs.Invalids, 1)
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
|
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
|
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
|
|
|
case "__type":
|
|
|
|
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
|
|
|
|
@@ -4762,6 +5210,52 @@ func (ec *executionContext) _TransAbsensiCheckDistanceResponse(ctx context.Conte
|
|
|
|
|
return out
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var transAbsensiCheckTimeAttendanceResponseImplementors = []string{"TransAbsensiCheckTimeAttendanceResponse"}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiCheckTimeAttendanceResponse(ctx context.Context, sel ast.SelectionSet, obj *model.TransAbsensiCheckTimeAttendanceResponse) graphql.Marshaler {
|
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, transAbsensiCheckTimeAttendanceResponseImplementors)
|
|
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
|
|
|
for i, field := range fields {
|
|
|
|
|
switch field.Name {
|
|
|
|
|
case "__typename":
|
|
|
|
|
out.Values[i] = graphql.MarshalString("TransAbsensiCheckTimeAttendanceResponse")
|
|
|
|
|
case "status":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_status(ctx, field, obj)
|
|
|
|
|
case "message":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_message(ctx, field, obj)
|
|
|
|
|
case "jam_clock_in":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_jam_clock_in(ctx, field, obj)
|
|
|
|
|
case "jam_clock_out":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_jam_clock_out(ctx, field, obj)
|
|
|
|
|
case "is_absen_clock_in":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_in(ctx, field, obj)
|
|
|
|
|
case "is_absen_clock_out":
|
|
|
|
|
out.Values[i] = ec._TransAbsensiCheckTimeAttendanceResponse_is_absen_clock_out(ctx, field, obj)
|
|
|
|
|
default:
|
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
out.Dispatch(ctx)
|
|
|
|
|
if out.Invalids > 0 {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
|
|
|
|
|
|
for label, dfs := range deferred {
|
|
|
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
|
|
|
Label: label,
|
|
|
|
|
Path: graphql.GetPath(ctx),
|
|
|
|
|
FieldSet: dfs,
|
|
|
|
|
Context: ctx,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return out
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var transAbsensiResponseImplementors = []string{"TransAbsensiResponse"}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _TransAbsensiResponse(ctx context.Context, sel ast.SelectionSet, obj *model.TransAbsensiResponse) graphql.Marshaler {
|
|
|
|
|
@@ -5243,6 +5737,20 @@ func (ec *executionContext) marshalNTransAbsensiCheckDistanceResponse2ᚖcomᚗs
|
|
|
|
|
return ec._TransAbsensiCheckDistanceResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNTransAbsensiCheckTimeAttendanceResponse2comᚗsismedikaᚗcomᚗabsensiᚋgraphᚋmodelᚐTransAbsensiCheckTimeAttendanceResponse(ctx context.Context, sel ast.SelectionSet, v model.TransAbsensiCheckTimeAttendanceResponse) graphql.Marshaler {
|
|
|
|
|
return ec._TransAbsensiCheckTimeAttendanceResponse(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNTransAbsensiCheckTimeAttendanceResponse2ᚖcomᚗsismedikaᚗcomᚗabsensiᚋgraphᚋmodelᚐTransAbsensiCheckTimeAttendanceResponse(ctx context.Context, sel ast.SelectionSet, v *model.TransAbsensiCheckTimeAttendanceResponse) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._TransAbsensiCheckTimeAttendanceResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNTransAbsensiResponse2comᚗsismedikaᚗcomᚗabsensiᚋgraphᚋmodelᚐTransAbsensiResponse(ctx context.Context, sel ast.SelectionSet, v model.TransAbsensiResponse) graphql.Marshaler {
|
|
|
|
|
return ec._TransAbsensiResponse(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
|
|