aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/LoadingSplash.svelte
blob: 2ab4c73913b0bd4c45ad2067f13e54eb9604c7f3 (plain) (blame)
1
2
3
4
5
6
7
<script>
	import { Icon } from '$comp';
</script>

<div class="flex justify-center items-center">
	<Icon icon="logo" style="mt-[calc(50vh-72px)]" />
</div>
2:02:24 -0700 committer Ran Guin <[email protected]> 2021-07-28 22:02:24 -0700 add apiParse for generating common search conditions' href='/coinos-server.git/commit/scripts/apiParse.js?h=classic&id=ed68ee893ae7bb3540f0731c3ccf21a26bc6ac1f'>ed68ee89 ^
c2464b24 ^
ed68ee89 ^
c2464b24 ^
ed68ee89 ^
c2464b24 ^
ed68ee89 ^
c2464b24 ^
ed68ee89 ^
c2464b24 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

                                                     
 


                    



                                                                                       
                            
                          
                                  

     









                          
 
                     
          






                                                     
   
 
                        
              
                                              
 
                     
          
              
   
  
export const addUserSearch = function(input, table) {
  var { search, starts_with, contains } = input;

  if (!table) {
    table = "users";
  }
  // if (since) cmd = cmd.havingRaw('invoices + payments + deposits + orders > ?', [0])

  if (search) {
    if (starts_with) {
      search = search + "%";
    } else if (contains) {
      search = "%" + search + "%";
    }

    var condition =
      "(" +
      table +
      ".email like '" +
      search +
      "' OR " +
      table +
      ".username like '" +
      search +
      "')";

    return condition;
  } else {
    return "";
  }
};

export const addTimeSearch = function(input, field) {
  if (!field) {
    field = "updatedAt";
  }

  var { since } = input;
  if (since) {
    condition = field + " >= '" + since + "'";

    return condition;
  } else {
    return "";
  }
};