<template>
    <div class="inline">
        <notification-component ref="notification"></notification-component>
        <div class="btn btn-sm btn-success b-rad-none requestModal"  data-type="arrival">Order Arrived</div>
        <confirm-modal-component
                title="Order Arrival"
                :message="'Are you sure this order has arrived to warehouse?'"
                type="arrival"
                v-on:confirm="completeArrival()">
            <div class="card card-default no-border m-b-0 m-t-15">
                <div class="card-block no-padding">
                    <action-date-component v-model="complete_date"></action-date-component>
                </div>
            </div>
        </confirm-modal-component>
    </div>

</template>

<script>
    export default {
        props: {
            'data': {
                required: true
            }
        },
        data() {
            return {
                isLoading: false,
                complete_date: null
            }
        },
        methods: {
            completeArrival() {
                this.$emit('updateStep', {'complete_date': this.complete_date, 'type': 'WAREHOUSE_ARRIVAL'});
            }
        }
    }
</script>