-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: inisiasi penggunaan package creasi/laravel-base
#25
Conversation
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
589414a
to
df36f16
Compare
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
instead of centralized in `shim.d.ts` Signed-off-by: Fery Wardiyanto <[email protected]>
let maintainers decide whether to customize the `creasi-config` on each projects Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
sometimes it problematic when run alongside `pnpm dev` Signed-off-by: Fery Wardiyanto <[email protected]>
use `useNaiveDiscreteApi()` inside script setup to get access to `MessageApi`, `NotificationApi`, `DialogApi` and `LoadingBarApi` Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
resources/client/utils/preference.ts
Outdated
export function useNaiveDiscreteApi() { | ||
return { | ||
message: inject('$message') as MessageApi, | ||
notification: inject('$notification') as NotificationApi, | ||
dialog: inject('$dialog') as DialogApi, | ||
loading: inject('$loading') as LoadingBarApi, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lines enable us to have access to the naive-ui discrete API. Simply by invoke it inside the vue component setup
<script setup lang="ts">
import type { NotificationType } from 'naive-ui'
const { notification } = useNaiveDiscreteApi()
function notify(type: NotificationType, content: string) {
notification[type]({ content })
}
</script>
<template>
<n-button @click="notify('error', 'Error notification here')">
Show error via composable
</n-button>
<n-button @click="$notification.error({ content: 'Error notification here' })">
Show error via global property
</n-button>
</template>
Signed-off-by: Fery Wardiyanto <[email protected]>
It feels so inconvenience if we have to do import alias every time we create a page just to change the page title. <script setup lang="ts">
import { Head as iHead } from '@inertiajs/vue3'
</script>
<template>
<i-head :title="$t('account.profile.page')" />
</template> Here I decided to use <script setup lang="ts">
defineOptions({
pageName: 'account.settings.page',
})
</script>
<template>
<!-- the page content -->
</template> Notice that the value of Caveats
|
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
but it looks akward indeed 😅 Signed-off-by: Fery Wardiyanto <[email protected]>
as mentioned that before we run `pnpm build` we need to run `composer ziggy:generate` just to ensure all routes are generated property as json. Since that inertia.js is actually generating full `APP_URL` there's no way to easily switch between url while we run `artisan serve` or throught nginx especially when running `pnpm dev`. We need to run `composer ziggy:generate` everytime we change the `APP_URL` in our `.env` file. Here we can change the `APP_URL` anytime without bothering to run `composer ziggy:generate` unless we actually update our routes definition Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
based on updates from alfu-space projects Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
Signed-off-by: Fery Wardiyanto <[email protected]>
ea5b581
to
f189e7a
Compare
Signed-off-by: Fery Wardiyanto <[email protected]>
Notable changes
Dalam PR ini kita memindahkan beberapa app-specific functionality ke package, antara lain :
public/assets
, menjadikan static assets tersebut reusable & memungkinkan kita cukup mengelola 1 package jika diperlukan adanya perubahan pada asset tersebut.To be considered
Untuk saat ini, walaupun package
base
yang sedang dibangun sudah dilengkapi dengan fungsional dasar untuk management user dan company yang sudah mendukung untuk digunakan pada berbagai skenario, namun saya belum melihat potensi untuk dapat di integrasikan langsung dengan inertia.Integrasi langsung yang dimaksud adalah sebuah fitur dimana UI dari package dapat di load langsung oleh inertia. Misalnya untuk load translasi dari package, kita bisa "mendaftarkan" translasi tersebut dengan namespace
creasico
agar translasi tersebut dapat di load dengan cara__('creasico::dashboard.page')
, see docsHal tersebut menjadikan (setidaknya untuk saat ini) kita masih perlu melakukan implementasi routing dan controller dari app, bukan dari package.
To-do