<template>
    <form-page :isEdit="true" title="Tambah Role" :schemas="schemas" :api="RoleApi"></form-page>
  </template>
  <script setup>
  import * as Yup from "yup";
  import FormPage from "@/components/Page/FormPage.vue";
  import { RoleApi } from "@/api/role.js";
  const schemas = [
    {
      label: "Kode Role",
      name: "code",
      validation: Yup.string().required().label("Kode Role"),
      cols: 12,
    },
    {
      label: "Nama Role",
      name: "name",
      validation: Yup.string().required().label("Nama Role"),
      cols: 6,
    },
  ];
  </script>
  