step 7 : clock in selfie or not
This commit is contained in:
@@ -48,7 +48,7 @@ type DirectiveRoot struct {
|
||||
type ComplexityRoot struct {
|
||||
Mutation struct {
|
||||
LoginAttendance func(childComplexity int, email string, idGoogleSignIn string) int
|
||||
MutationClockInAttendance func(childComplexity int, tTransactionMAbsensiTypeID string, tTransactionMStaffID string, tTransactionMCompanyID string, tTransactionCurrentLatitude string, tTransactionCurrentLongitude string, tTransactionDistance string, tTransactionSelfiePhoto *string, tTransactionNote *string) int
|
||||
MutationClockInAttendance func(childComplexity int, tTransactionMStaffID string, tTransactionMCompanyID string, tTransactionCurrentLatitude string, tTransactionCurrentLongitude string, tTransactionCurrentDistance string, tTransactionSelfiePhoto *string, token string, isSelfie string) int
|
||||
}
|
||||
|
||||
Query struct {
|
||||
@@ -98,7 +98,7 @@ type ComplexityRoot struct {
|
||||
|
||||
type MutationResolver interface {
|
||||
LoginAttendance(ctx context.Context, email string, idGoogleSignIn string) (*model.Staff, error)
|
||||
MutationClockInAttendance(ctx context.Context, tTransactionMAbsensiTypeID string, tTransactionMStaffID string, tTransactionMCompanyID string, tTransactionCurrentLatitude string, tTransactionCurrentLongitude string, tTransactionDistance string, tTransactionSelfiePhoto *string, tTransactionNote *string) (*model.TransAbsensiResponse, error)
|
||||
MutationClockInAttendance(ctx context.Context, tTransactionMStaffID string, tTransactionMCompanyID string, tTransactionCurrentLatitude string, tTransactionCurrentLongitude string, tTransactionCurrentDistance string, tTransactionSelfiePhoto *string, token string, isSelfie string) (*model.TransAbsensiResponse, error)
|
||||
}
|
||||
type QueryResolver interface {
|
||||
SearchStaffByEmail(ctx context.Context, email string) (*model.Staff, error)
|
||||
@@ -148,7 +148,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Mutation.MutationClockInAttendance(childComplexity, args["T_TransactionM_AbsensiTypeID"].(string), args["T_TransactionM_StaffID"].(string), args["T_TransactionM_CompanyID"].(string), args["T_TransactionCurrentLatitude"].(string), args["T_TransactionCurrentLongitude"].(string), args["T_TransactionDistance"].(string), args["T_TransactionSelfiePhoto"].(*string), args["T_TransactionNote"].(*string)), true
|
||||
return e.complexity.Mutation.MutationClockInAttendance(childComplexity, args["T_TransactionM_StaffID"].(string), args["T_TransactionM_CompanyID"].(string), args["T_TransactionCurrentLatitude"].(string), args["T_TransactionCurrentLongitude"].(string), args["T_TransactionCurrentDistance"].(string), args["T_TransactionSelfiePhoto"].(*string), args["token"].(string), args["isSelfie"].(string)), true
|
||||
|
||||
case "Query.queryCheckDistance":
|
||||
if e.complexity.Query.QueryCheckDistance == nil {
|
||||
@@ -539,7 +539,7 @@ extend type Query {
|
||||
# mutation
|
||||
extend type Mutation {
|
||||
# untuk clock in absensi (absensi masuk)
|
||||
mutationClockInAttendance(T_TransactionM_AbsensiTypeID:String!, T_TransactionM_StaffID:String!, T_TransactionM_CompanyID:String!, T_TransactionCurrentLatitude:String!, T_TransactionCurrentLongitude:String!, T_TransactionDistance:String!, T_TransactionSelfiePhoto:String, T_TransactionNote:String):TransAbsensiResponse!
|
||||
mutationClockInAttendance(T_TransactionM_StaffID:String!, T_TransactionM_CompanyID:String!, T_TransactionCurrentLatitude:String!, T_TransactionCurrentLongitude:String!, T_TransactionCurrentDistance:String!, T_TransactionSelfiePhoto:String, token:String!, isSelfie:String!):TransAbsensiResponse!
|
||||
} `, BuiltIn: false},
|
||||
}
|
||||
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
||||
@@ -576,77 +576,77 @@ func (ec *executionContext) field_Mutation_mutationClockInAttendance_args(ctx co
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 string
|
||||
if tmp, ok := rawArgs["T_TransactionM_AbsensiTypeID"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionM_AbsensiTypeID"))
|
||||
if tmp, ok := rawArgs["T_TransactionM_StaffID"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionM_StaffID"))
|
||||
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionM_AbsensiTypeID"] = arg0
|
||||
args["T_TransactionM_StaffID"] = arg0
|
||||
var arg1 string
|
||||
if tmp, ok := rawArgs["T_TransactionM_StaffID"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionM_StaffID"))
|
||||
if tmp, ok := rawArgs["T_TransactionM_CompanyID"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionM_CompanyID"))
|
||||
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionM_StaffID"] = arg1
|
||||
args["T_TransactionM_CompanyID"] = arg1
|
||||
var arg2 string
|
||||
if tmp, ok := rawArgs["T_TransactionM_CompanyID"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionM_CompanyID"))
|
||||
if tmp, ok := rawArgs["T_TransactionCurrentLatitude"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionCurrentLatitude"))
|
||||
arg2, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionM_CompanyID"] = arg2
|
||||
args["T_TransactionCurrentLatitude"] = arg2
|
||||
var arg3 string
|
||||
if tmp, ok := rawArgs["T_TransactionCurrentLatitude"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionCurrentLatitude"))
|
||||
if tmp, ok := rawArgs["T_TransactionCurrentLongitude"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionCurrentLongitude"))
|
||||
arg3, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionCurrentLatitude"] = arg3
|
||||
args["T_TransactionCurrentLongitude"] = arg3
|
||||
var arg4 string
|
||||
if tmp, ok := rawArgs["T_TransactionCurrentLongitude"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionCurrentLongitude"))
|
||||
if tmp, ok := rawArgs["T_TransactionCurrentDistance"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionCurrentDistance"))
|
||||
arg4, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionCurrentLongitude"] = arg4
|
||||
var arg5 string
|
||||
if tmp, ok := rawArgs["T_TransactionDistance"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionDistance"))
|
||||
arg5, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionDistance"] = arg5
|
||||
var arg6 *string
|
||||
args["T_TransactionCurrentDistance"] = arg4
|
||||
var arg5 *string
|
||||
if tmp, ok := rawArgs["T_TransactionSelfiePhoto"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionSelfiePhoto"))
|
||||
arg6, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
||||
arg5, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionSelfiePhoto"] = arg6
|
||||
var arg7 *string
|
||||
if tmp, ok := rawArgs["T_TransactionNote"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("T_TransactionNote"))
|
||||
arg7, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
||||
args["T_TransactionSelfiePhoto"] = arg5
|
||||
var arg6 string
|
||||
if tmp, ok := rawArgs["token"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("token"))
|
||||
arg6, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["T_TransactionNote"] = arg7
|
||||
args["token"] = arg6
|
||||
var arg7 string
|
||||
if tmp, ok := rawArgs["isSelfie"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isSelfie"))
|
||||
arg7, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["isSelfie"] = arg7
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ func (ec *executionContext) _Mutation_mutationClockInAttendance(ctx context.Cont
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Mutation().MutationClockInAttendance(rctx, fc.Args["T_TransactionM_AbsensiTypeID"].(string), fc.Args["T_TransactionM_StaffID"].(string), fc.Args["T_TransactionM_CompanyID"].(string), fc.Args["T_TransactionCurrentLatitude"].(string), fc.Args["T_TransactionCurrentLongitude"].(string), fc.Args["T_TransactionDistance"].(string), fc.Args["T_TransactionSelfiePhoto"].(*string), fc.Args["T_TransactionNote"].(*string))
|
||||
return ec.resolvers.Mutation().MutationClockInAttendance(rctx, fc.Args["T_TransactionM_StaffID"].(string), fc.Args["T_TransactionM_CompanyID"].(string), fc.Args["T_TransactionCurrentLatitude"].(string), fc.Args["T_TransactionCurrentLongitude"].(string), fc.Args["T_TransactionCurrentDistance"].(string), fc.Args["T_TransactionSelfiePhoto"].(*string), fc.Args["token"].(string), fc.Args["isSelfie"].(string))
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
|
||||
Reference in New Issue
Block a user