<script setup>

import UserSubPageWrapper from "@/views/dashboards/superUserDashboard/user/UserSubPageWrapper.vue";
import PageTitle from "@/components/global/PageTitle.vue";
import { useRouter } from 'vue-router'
import {user, getUserData, userId, setUser, getUserCustomerNumber} from "@/views/dashboards/superUserDashboard/user/SuperUserSelectedUserObject.vue";
import {SessionUser} from "@/components/session/token/SessionUser.vue";
import OrdersPagination from "@/components/displays/pagination/models/DepartmentPos/OrdersPagination.vue";
import {ref, watch} from "vue";
import NotFoundFallBackPageWrapper from "@/components/page/wrappers/NotFoundFallBackPageWrapper.vue";
import PageLoader from "@/components/global/PageLoader.vue";
import Swal from "sweetalert2";
import WhiteBox from "@/components/displays/boxes/WhiteBox.vue";
import UserOtherSpecialArrangement
  from "@/views/dashboards/superUserDashboard/user/displays/other/UserOtherSpecialArrangement.vue";
import UserOtherVaskeabonnement
  from "@/views/dashboards/superUserDashboard/user/displays/other/UserOtherVaskeabonnement.vue";
// Get the user from the route
const router = useRouter()

// Set the user
setUser(router.currentRoute.value.params.userId);

const reload = () => {
  // Reload the user data
  getUserData();
};
</script>

<template>
  <UserSubPageWrapper>
    <template #title>
      <PageTitle title="User" subtitle="Other" />
    </template>
    <div class="mx-3 mb-6">
      <p>User ID: {{ userId }} (Customer number: {{ user.customer_number }})</p>
      <userOtherSpecialArrangement :user_id="userId" class="mb-2"/>
      <user-other-vaskeabonnement :user_id="userId" />
    </div>

  </UserSubPageWrapper>
</template>

<style scoped>

</style>