Skip to content

Commit

Permalink
Merge pull request #10 from jo-gross/fix/search
Browse files Browse the repository at this point in the history
Fixed search page and added linting
  • Loading branch information
jo-gross authored Nov 15, 2023
2 parents bba7be5 + 702b97f commit 9bdfe03
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'docker' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
interval: 'weekly'
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
16 changes: 8 additions & 8 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,40 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: "Checkout"
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Node.js setup"
- name: 'Node.js setup'
uses: actions/setup-node@v3
with:
node-version: 21

- name: "Install dependencies"
- name: 'Install dependencies'
run: yarn install

- name: "Run Prettier"
- name: 'Run Prettier'
run: yarn format:check

Build:
runs-on: ubuntu-latest

steps:
- name: "Checkout"
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Node.js setup"
- name: 'Node.js setup'
uses: actions/setup-node@v3
with:
node-version: 21

- name: "Install dependencies"
- name: 'Install dependencies'
run: yarn install

- name: "Build"
- name: 'Build'
run: |
yarn run build
Expand Down
4 changes: 2 additions & 2 deletions components/ManageColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export function ManageColumn(props: ManageColumnProps) {
{userContext.isUserPermitted(props.editRole ?? Role.MANAGER) ? (
<div className={'flex items-center justify-end space-x-2'}>
<Link href={`/workspaces/${workspaceId}/manage/${props.entity}/${props.id}`}>
<div className={'btn btn-primary btn-outline btn-sm'}>Edit</div>
<div className={'btn btn-outline btn-primary btn-sm'}>Edit</div>
</Link>
<button
type={'button'}
className={'btn btn-error btn-outline btn-sm'}
className={'btn btn-outline btn-error btn-sm'}
disabled={!userContext.isUserPermitted(props.deleteRole ?? Role.ADMIN)}
onClick={() => {
modalContext.openModal(
Expand Down
4 changes: 2 additions & 2 deletions components/cocktails/CocktailRecipeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export function CocktailRecipeForm(props: CocktailRecipeFormProps) {
) : (
<div className={'relative'}>
<div
className={'btn btn-square btn-error btn-outline btn-sm absolute right-2 top-2'}
className={'btn btn-square btn-outline btn-error btn-sm absolute right-2 top-2'}
onClick={() =>
modalContext.openModal(
<DeleteConfirmationModal
Expand Down Expand Up @@ -960,7 +960,7 @@ export function CocktailRecipeForm(props: CocktailRecipeFormProps) {
<div className={'flex w-full justify-end'}>
<button
type={'button'}
className={'btn btn-secondary btn-outline btn-sm space-x-2'}
className={'btn btn-outline btn-secondary btn-sm space-x-2'}
onClick={() =>
pushIngredient({
amount: 0,
Expand Down
2 changes: 1 addition & 1 deletion components/garnishes/GarnishForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function GarnishForm(props: GarnishFormProps) {
) : (
<div className={'relative'}>
<div
className={'btn btn-square btn-error btn-outline btn-sm absolute right-2 top-2'}
className={'btn btn-square btn-outline btn-error btn-sm absolute right-2 top-2'}
onClick={() => {
modalContext.openModal(
<DeleteConfirmationModal
Expand Down
2 changes: 1 addition & 1 deletion components/glasses/GlassForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function GlassForm(props: GlassFormProps) {
) : (
<div className={'relative'}>
<div
className={'btn btn-square btn-error btn-outline btn-sm absolute right-2 top-2'}
className={'btn btn-square btn-outline btn-error btn-sm absolute right-2 top-2'}
onClick={() =>
modalContext.openModal(
<DeleteConfirmationModal
Expand Down
2 changes: 1 addition & 1 deletion components/ingredients/IngredientForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function IngredientForm(props: IngredientFormProps) {
) : (
<div className={'relative'}>
<div
className={'btn btn-square btn-error btn-outline btn-sm absolute right-2 top-2'}
className={'btn btn-square btn-outline btn-error btn-sm absolute right-2 top-2'}
onClick={() =>
modalContext.openModal(
<DeleteConfirmationModal
Expand Down
2 changes: 1 addition & 1 deletion components/layout/AuthBoundary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function AuthBoundary(props: AlertBoundaryProps) {
<PageCenter>
<div className={'flex flex-col items-center justify-center gap-4'}>
<Loading name={'Lade Nutzer...'} />
<button className={'btn btn-error btn-outline btn-xs'} onClick={cancelLogin}>
<button className={'btn btn-outline btn-error btn-xs'} onClick={cancelLogin}>
Abbrechen
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/modals/CocktailDetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function CocktailDetailModal(props: CocktailDetailModalProps) {
{userContext.isUserPermitted(Role.MANAGER) && (
<Link href={`/workspaces/${workspaceId}/manage/cocktails/${props.cocktail.id}`}>
<div
className={'btn btn-square btn-secondary btn-outline btn-sm'}
className={'btn btn-square btn-outline btn-secondary btn-sm'}
onClick={() => modalContext.closeModal()}
>
<FaPencilAlt />
Expand Down
2 changes: 1 addition & 1 deletion components/modals/SearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function SearchModal(props: SearchModalProps) {
{showRecipe ? <input type="checkbox" /> : <></>}
<div className={`${showRecipe ? 'collapse-title' : 'p-2'} flex justify-between text-xl font-medium`}>
{cocktail.name}{' '}
{props.showRecipe && !showRecipe && props.onCocktailSelectedObject != undefined && (
{!showRecipe && props.onCocktailSelectedObject != undefined && (
<button
type="button"
disabled={props.selectedCocktails?.includes(cocktail.id) ?? false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default function CalculationPage() {
<span>{calculationName}</span>
<div
className={
'btn btn-circle btn-info btn-outline btn-xs flex items-center justify-center border print:hidden'
'btn btn-circle btn-outline btn-info btn-xs flex items-center justify-center border print:hidden'
}
onClick={openNameModal}
>
Expand Down
8 changes: 4 additions & 4 deletions pages/workspaces/[workspaceId]/manage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function ManagePage() {
actions={[
<div
key={'profile'}
className="dropdown-end dropdown rounded-xl border border-none border-base-200 md:border-solid"
className="dropdown dropdown-end rounded-xl border border-none border-base-200 md:border-solid"
>
<label tabIndex={0} className="btn btn-ghost">
<>
Expand All @@ -47,7 +47,7 @@ export default function ManagePage() {
</div>
) : (
<div className="avatar placeholder">
<div className="w-8 rounded-full bg-neutral-focus text-neutral-content">
<div className="bg-neutral-focus w-8 rounded-full text-neutral-content">
<span className="text-xs">
{userContext.user?.name
?.split(' ')
Expand All @@ -62,7 +62,7 @@ export default function ManagePage() {
</label>
<ul
tabIndex={0}
className="menu dropdown-content rounded-box menu-sm z-[1] mt-2 w-52 gap-2 border border-base-200 bg-base-100 p-2 shadow"
className="menu dropdown-content menu-sm z-[1] mt-2 w-52 gap-2 rounded-box border border-base-200 bg-base-100 p-2 shadow"
>
<div className={'pt-1 text-center text-lg font-bold md:hidden'}>{userContext.user?.name}</div>
<div className={'divider-sm md:hidden'}></div>
Expand All @@ -71,7 +71,7 @@ export default function ManagePage() {
</li>
<div className={'divider-sm'}></div>
<button
className={'btn btn-error btn-outline btn-sm'}
className={'btn btn-outline btn-error btn-sm'}
onClick={async () => {
await router.replace('/');
await signOut();
Expand Down
6 changes: 3 additions & 3 deletions pages/workspaces/[workspaceId]/manage/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function WorkspaceSettingPage() {
<th className={'flex justify-end'}>
{userContext.isUserPermitted(Role.ADMIN) && (
<button
className={'btn btn-primary btn-outline btn-sm'}
className={'btn btn-outline btn-primary btn-sm'}
onClick={() => {
navigator.clipboard.writeText(workspaceId as string);
alertService.info('Erfolgreich kopiert');
Expand Down Expand Up @@ -284,7 +284,7 @@ export default function WorkspaceSettingPage() {
onChange={(event) => setNewWorkspaceName(event.target.value)}
/>
<button
className={'btn btn-error btn-outline'}
className={'btn btn-outline btn-error'}
disabled={newWorkspaceName.length < 3 || newWorkspaceName.length > 50}
onClick={handleRenameWorkspace}
>
Expand All @@ -293,7 +293,7 @@ export default function WorkspaceSettingPage() {
</div>
<div className={'divider'}></div>
<button
className={'btn btn-error btn-outline'}
className={'btn btn-outline btn-error'}
onClick={() =>
modalContext.openModal(
<DeleteConfirmationModal onApprove={handleDeleteWorkspace} spelling={'DELETE'} />,
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5521,11 +5521,11 @@ __metadata:

"typescript@patch:typescript@5.2.2#~builtin<compat/typescript>":
version: 5.2.2
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=1f5320"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca
checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554
languageName: node
linkType: hard

Expand Down

0 comments on commit 9bdfe03

Please sign in to comment.