<template>
    <div class="row">
        <div class="col-md-12">

            <div class="d-flex flex-wrap mb-4">
                <div class="mr-auto">
                   <div class="d-flex">
                        <div>
                            <span class="text-title"> <span class='text-muted'>{{ $t("Payment Method") }}</span> {{ payment_method.label }} </span>
                        </div>
                    </div>
                </div>
                <div class="">
                    <span v-bind:class="payment_method.status.color">{{ payment_method.status.label }}</span>
                </div>
            </div>

            <div class="mb-2">
                <span class="text-subhead">{{ $t("Basic Information") }}</span>
            </div>
            <div class="form-row mb-2">
                <div class="form-group col-md-3">
                    <label for="label">{{ $t("Payment Method") }}</label>
                    <p>{{ payment_method.label }}</p>
                </div>
                <div class="form-group col-md-3">
                    <label for="created_by">{{ $t("Created By") }}</label>
                    <p>{{ (payment_method.created_by == null)?'-':payment_method.created_by['fullname']+' ('+payment_method.created_by['user_code']+')' }}</p>
                </div>
                <div class="form-group col-md-3">
                    <label for="updated_by">{{ $t("Updated By") }}</label>
                    <p>{{ (payment_method.updated_by == null)?'-':payment_method.updated_by['fullname']+' ('+payment_method.updated_by['user_code']+')' }}</p>
                </div>
                <div class="form-group col-md-3">
                    <label for="created_on">{{ $t("Created On") }}</label>
                    <p>{{ payment_method.created_at_label }}</p>
                </div>
                <div class="form-group col-md-3">
                    <label for="updated_on">{{ $t("Updated On") }}</label>
                    <p>{{ payment_method.updated_at_label }}</p>
                </div>
            </div>

            <div class="form-row mb-2">
                <div class="form-group col-md-6">
                    <label for="description">{{ $t("Description") }}</label>
                    <p>{{ payment_method.description }}</p>
                </div>
            </div>

        </div>
    </div>
</template>  

<script>
    'use strict';
    
    export default {
        data(){
            return{
                payment_method : this.payment_method_data
            }
        },
        props: {
            payment_method_data: [Array, Object]
        },
        mounted() {
            console.log('Payment Method detail page loaded');
        },
        methods: {
           
        }
    }
</script>